Rant of the day

Adam D. Ruppe destructionator at gmail.com
Mon Jan 25 16:11:28 UTC 2021


On Monday, 25 January 2021 at 15:07:02 UTC, Rumbu wrote:
> Do you know what happens if you write GC.Free insead of GC.free?

F.d(4): Error: no property Free for type GC, did you mean 
core.memory.GC.free?


There's gotta be something more to it on your end. My guess is 
some other import with a function called Free that is triggering 
all this ugliness.

D's error messages do suck.

Bigger problem with GC.free is it might not do what you think it 
does, be warned: https://issues.dlang.org/show_bug.cgi?id=21550

If you GC.malloc, it good, but if you `new int[]` then try to 
`GC.free` it is a silent no-op.


More information about the Digitalmars-d mailing list