StaticenableEnables the tracking of allocated objects.
StaticflushStaticgetReturns an array of all valid tracked objects (that have not been garbage collected).
Important note: this array will hold actual references (dereferenced WeakRefs).
They will no longer be removed by the garbage collector as long as values in this arrays
exist ! You should make sure to empty this array when you are finished with it.
The tracked objects.
StaticgetStatictrack
Utility to track memory allocations.
This uses
WeakRefinternally to avoid holding a reference past its lifetime.Example