A possible leak

Vladimir Panteleev thecybershadow at gmail.com
Sun Oct 4 04:37:35 PDT 2009


On Sun, 04 Oct 2009 09:07:59 +0300, bearophile <bearophileHUGS at lycos.com>  
wrote:

> Vladimir Panteleev:
>
>> This problem isn't something that can be easily fixed. Any stray  
>> reference
>> to any node in the list will prevent nodes following it from ever being
>> deallocated.
>
> Whoa, a very long and detailed answer :-) Thank you.
> Do you know why in LDC this program seems to work in constant memory?

My guess would be that it doesn't add the entire static data segment of  
the standard C library to the list of GC roots, therefore the chances of a  
stray pointer are much lower.

-- 
Best regards,
  Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list