GC BUG: Referenced object destroyed before released

Christopher Wright dhasenan at gmail.com
Mon Mar 17 05:45:55 PDT 2008


Vladimir Panteleev wrote:
> On Sun, 16 Mar 2008 17:58:40 +0200, Christopher Wright <dhasenan at gmail.com> wrote:
> 
>> Getting around this would not be extremely difficult, I think. 
> 
> You could also write custom class allocators and use non-managed memory for manual memory management:
> 
> http://www.digitalmars.com/d/1.0/class.html#allocators
> 

Then your destructors must delete all their owned children and free that 
memory. Fortunately, opDelete is inherited, so they just have to delete 
their children.



More information about the Digitalmars-d mailing list