Re: Either I'm confused or the gc is

ketmar ketmar at ketmar.no-ip.org
Thu Oct 22 01:30:41 UTC 2020


donallen wrote:

> But working with gdb, I found that the account structs after 
> the error messages start are zeroed.
GC should not zero any memory by itself (it doesn't "clear" freed chunks). 
it looks like the GC is reusing the allocated memory.

you can use `core.memory.GC.addrOf()` to check if your pointers are 
still "alive". you can add calls to `addrOf()` before processing a data, it 
may help to catch the moment data is incorrectly freed (if that happens).


More information about the Digitalmars-d mailing list