I am using the Observatory to profile the heap of my app. The dominator tree view of the heap snapshot shows a function called *Pivot.pivotScenario.<pivotScenario_async_body> is not being collected. I think this is a closure generated by the VM for my async function. I have attached a screenshot of this view.
If I click on one of these pivotScenario_async_body objects I get to the object view. In the inbound references section the only references listed are from objects called _WeakProperty. Screenshot attached.
What are these WeakProperties and why are they preventing GC? WeakProperty sounds like it should be a weak reference.
This is with Dart 1.15.0.
I have written a dart native extension for level db which is used by this app so I suppose its possible that I have a problem in its implementation.