GC issue? List.pool overwritten by allocated object

Denis Feklushkin feklushkin.denis at gmail.com
Tue May 13 10:08:02 UTC 2025


First of all, I want to thank everyone for their help. And, yes - 
I forgot to check obvious things before I was deep into GC

On Monday, 12 May 2025 at 21:29:10 UTC, Steven Schveighoffer 
wrote:

> Having errors very much points at the problem happening 
> *before* `new` is called. If it's not always failing in the 
> same spot, that sounds a lot like memory corruption. And very 
> often the corruption happens long before the explosion.
>

> First thing I would rule out is C memory being used to refer to 
> GC objects. Focus on places where C memory is allocated, 
> especially with things like callbacks + data pointer.
>
> Another cause, as I mentioned above, is using a GC object to 
> manage C memory, and then forgetting the GC object but 
> remembering the C memory.
>
> -Steve

So far I have done two things in this direction:

1. I called GC.disable() at start of main()
2. destroy() was removed from the code

It seems like this should eliminate probability of use after 
freeing and referring from C to D objects? Nothing has changed, 
issue is still here

dustmite needs a lot of time - I launched it but I'm still waiting



More information about the Digitalmars-d mailing list