Clarifcation on AA allocation

pragma pragma_member at pathlink.com
Sat Apr 8 14:13:01 PDT 2006


Is there any way to 'manually' allocate memory for an AA in D?

The problem that prompted me to ask this?  Well, I have a class that maintains a
set of HANDLES using an AA.  Ideally, I'd like to be able to free these using
the class' dtor(), but isn't there the possibility that the GC will eliminate
the AA's memory before the dtor() is even called?

I suppose I could instruct the GC to 'ignore' the AA via 'removeRange' for
safety reasons, but I'd like to know if anyone else has a more elegant solution?

- EricAnderton at yahoo



More information about the Digitalmars-d-learn mailing list