Original NG topic : http://forum.dlang.org/post/[email protected]
This code does not actually free anything:
```
void main()
{
ubyte[] result;
result.length = 4096;
GC.free(result.ptr);
}
```
This happens because for larger size blocks capacity is stored in the beginning of the memory block making actual `array.ptr` interior pointer. Interior pointers are ignored by GC.free
There are several possible ways for fixing this that are being considered right now.
Comment #1 by robert.schadek — 2024-12-07T13:34:16Z