Runtime.collectHandler

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.

  1. CollectHandler collectHandler [@property setter]
    struct Runtime
    extern (C) pragma(mangle, "rt_setCollectHandler") static @property
    void
    collectHandler
    (
    CollectHandler h
    )
  2. CollectHandler collectHandler [@property getter]

Parameters

h CollectHandler

The new collect handler. Set to null to use the default handler.

Meta