Runtime.collectHandler

void collectHandler( CollectHandler h ) @property

Overrides the default collect hander with a user-supplied version. This routine will be called for each resource object that is finalized in a non-deterministic manner--typically during a garbage collection cycle. If the supplied routine returns true then the object's dtor will called as normal, but if the routine returns false than the dtor will not be called. The default behavior is for all object dtors to be called.

Parameters

hThe new collect handler. Set to null to use the default handler.
CollectHandler collectHandler() @property

Gets the current collect handler.

Returns

The current collect handler or null if none has been set.