[Issue 4621] Destructors are inherently un- at safe

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 12 07:06:14 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4621



--- Comment #12 from nfxjfg at gmail.com 2010-08-12 07:06:10 PDT ---
By the way, separation between finalizers and destructors has been in Tango for
ages.

There's the Object.dipose() method. This method is only called on deterministic
destruction, e.g on delete or with scope classes.

The "destructor" ~this is the finalizer and is always called, both on delete or
on collection.

(This was done so mainly for backward comnpatibility, while still satisfying
the need for knowing about deterministic destruction.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list