Static
enableEnables the tracking of allocated objects.
Static
flushStatic
getReturns an array of all valid tracked objects (that have not been garbage collected).
Important note: this array will hold actual references (dereferenced WeakRef
s).
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.
Static
getStatic
track
Utility to track memory allocations.
This uses
WeakRef
internally to avoid holding a reference past its lifetime.Example