GC.collect bug ?

thedeemon dlang at thedeemon.com
Sun Sep 15 10:31:26 PDT 2013


On Friday, 13 September 2013 at 15:24:17 UTC, Temtaime wrote:
> 	auto a = new A;
> 	a = null;
> 	GC.collect();

I suspect the compiler sees that "a" isn't used anywhere down the 
function, so it optimizes away "a = null", hence it's not null 
when GC happens. Better look at generated assembly to be sure.


More information about the Digitalmars-d-learn mailing list