Utilities for working with the garbage collector.
HXCPP is built on Immix. HTML5 builds use the browser's built-in mark-and-sweep and JS has no APIs to interact with it.
See also:
cpp.vm.Gc
Static methods
staticcollect(major:Bool = false):Void
Manually perform garbage collection once. Should only be called from the main thread.
Parameters:
major |
|
|---|
staticcompact():Void
Perform major garbage collection repeatedly until less than 16kb of memory is freed in one operation. Should only be called from the main thread.
NOTE: This is DIFFERENT from actual compaction,