struct destructor

frame frame86 at live.com
Thu May 20 11:47:39 UTC 2021


On Sunday, 16 May 2021 at 11:42:19 UTC, Adam D. Ruppe wrote:
> On Sunday, 16 May 2021 at 08:04:06 UTC, cc wrote:

> I tracked down the problem but wasn't 100% sure about the fix. 
> Adding the GC.baseOf thing works for me but i didn't upstream 
> since idk if it works for everyone else.
>
> maybe i should just do it though.

I don't know it it is really affected but

there is also a GC.free with just .ptr in AAs implementation in 
resize(). As I am understanding this issue it would lead to 
memory leaks on buckets (on re-used AA or if it cannot be set to 
null) with many items that are shrinking or growing over time.

And any pointer in the buckets entry would be seen alive too?

I know that are edge cases but still... maybe you could have a 
look at these things in the runtime source too.




More information about the Digitalmars-d-learn mailing list