Out of memory error (even when using destroy())

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 26 07:05:34 PDT 2017


On 05/26/2017 10:15 AM, realhet wrote:
> But hey, the GC knows that is should not search for any pointers in 
> those large blocks.
> And the buffer is full of 0-s at the start, so there can't be any 'false 
> pointers' in it. And I think the GC will not search in it either.

The issue is not that the block contains a false pointer, but that 
there's a false pointer elsewhere that points into the block. The bigger 
the block, the more likely it is that something (e.g. an int on the 
stack) is mistaken for a pointer into it.


More information about the Digitalmars-d-learn mailing list