W3cubDocs

/Haxe HashLink

Gc

package hl

Available on hl

Static variables

static flags:EnumFlags<GcFlag>

Static methods

@:value({ fileName : "hlmemory.dump" }) static dumpMemory (fileName:String = "hlmemory.dump"):Void

Dump whole memory into target filename for analysis.

@:hlNative("std","gc_enable") static enable (b:Bool):Void

@:hlNative("std","gc_major") static major ():Void

static stats ():{totalAllocated:Float, currentMemory:Float, allocationCount:Float}

static track (obj:Dynamic, field:String, callb:Dynamic ‑> Bytes ‑> Void):Void

Start tracking an object field change. The check will be performed every allocation and the callback function triggered everytime a change has been performed since last check. The callback parameter is true if the object was collected. It is necessary to enable the Track flag in Gc.flags

@:hlNative("std","gc_track_count") static trackCount ():Int

static untrack (obj:Dynamic):Bool

@:hlNative("std","gc_untrack_all") static untrackAll ():Void

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/hl/Gc.html