Destroying structs (literally)
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 29 07:11:47 PDT 2014
On 29/08/14 12:53, "Marc Schütz" <schuetzm at gmx.net>" wrote:
> Jacob Carlborg just recently brought this up in another thread. Isn't it
> kind of consensus that calling a destructor from the GC is not a good
> idea because of the restrictions that apply in this context? Andrei even
> wanted to deprecate destructors for classes because of this. Maybe a
> better direction would be to separate the concepts of destruction and
> finalization, and introduce two kinds of "destructors" for them.
Yeah, Tango for D1 added a new method, "dispose", to Object. It's called
when "delete" or "scope" is used.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list