The "@safe vs struct destructor" dilemma

Michel Fortin michel.fortin at michelf.ca
Sat Apr 12 04:12:56 PDT 2014


On 2014-04-12 08:50:59 +0000, "Marc Schütz" <schuetzm at gmx.net> said:

> More correctly, every reference to the destroyed object needs to be 
> wiped, not the object itself. But this requires a fully precise GC.

That'd be more costly (assuming you could do it) than just wiping the 
object you just destroyed. But it'd solve the issue of leaking a 
reference to the outside world from the destructor.

-- 
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca



More information about the Digitalmars-d mailing list