Sean Kelly wrote:
> ...
>
> import core.runtime;
>
> interface Disposable
> {
> void dispose();
> }
>
> bool handler( Object o )
> {
> auto d = cast(Disposable) o;
>
> if( d !is null )
> {
> d.dispose();
> return false;
> }
> return true;
> }
>
> static this()
> {
> Runtime.collectHandler = &handler;
> }
>
> If you return false from your collectHandler then the runtime won't call
> the object's dtor.:O ?cookie SeanK -- Daniel
