On 2012-12-28 05:41, Jonathan M Davis wrote:
The idea is that if you want to be manually freeing memory, you shouldn't be
using GC memory in the first place. It's unsafe to be freeing it. Let the GC do
that. If you want to manually manage memory, then manually manage it with
malloc and free. If you really need to, then core.memory has the functions for
managing the GC's memory, but you really shouldn't be doing that normally.

I don't require manual malloc. I wanted to make a hint to the GC, that this block can be freed, because I know there are no other pointers into it (that would be used later), while the imprecise GC finds false pointers and prevents the block from being released.

Of course delete is not safe in general, but if the program is designed to process data in completely isolated batches, then it shouldn't pose a threat.

Reply via email to