leakcanary icon indicating copy to clipboard operation
leakcanary copied to clipboard

Expose high level constructs to read through common data structures

Open pyricau opened this issue 3 years ago • 1 comments

We already have the concept of ReferenceReader, which is currently internal, and abstracts away tree traversal.

I'm wondering if, separately, we should have a more user friendly version when you know something is e.g. a LinkedHashMap and you want an API to recreate one or traverse it. I actually needed that recently (note: the ReferenceReader version for LinkedHashMap doesn't traverse in the actual link order, it's just going the same way as HashMap)

Since I've done the work or reverse engineering those, might as well make it easy to reuse? Ideally in a way that works for ReferenceReader and for something easier. Or we promote a variant of ReferenceReader to public.

pyricau avatar Apr 12 '22 20:04 pyricau

What I meant here is providing this as part of the Shark / graph APIs rather than use it internally.

pyricau avatar Nov 11 '22 05:11 pyricau