large objects and GC

BCS ao at pathlink.com
Fri May 16 14:58:41 PDT 2008


Reply to Vladimir,

> This will be effectively the same as having a "wrapper" class for
> manually allocated memory. The class destructor, which will be called
> by the GC, should deallocate the external memory. The wrapper class
> should only have one field, and thus be very small and it will have
> the chance of leaking almost equivalent to the method you describe. I
> see no necessity for reference counting either, you just pass around
> the reference to the wrapper object.

I think this is based on the assumption that lots of systems only ever use 
the base pointer so why not let the programer leverage that?





More information about the Digitalmars-d mailing list