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. void collectHandler(CollectHandler h)
    struct Runtime
    static @property
    void
    collectHandler
    (
    CollectHandler h
    )
  2. CollectHandler collectHandler()

Parameters

h

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

Suggestion Box / Bug Report