July 10, 2010 [Issue 4442] New: Destructors not called for new-allocated struct objects | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=4442 Summary: Destructors not called for new-allocated struct objects Product: D Version: unspecified Platform: Other OS/Version: Mac OS X Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrei@metalanguage.com --- Comment #0 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-07-09 20:20:39 PDT --- Example brought up by Sean Kelly in private correspondence: struct S1{ ~this() { writeln("dtor"); } } void main() { auto a = S1(); auto b = new S1(); delete b; auto c = new S1(); c = null; GC.collect(); } "dtor" is only printed twice. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
July 10, 2010 [Issue 4442] Destructors not called for new-allocated struct objects | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | http://d.puremagic.com/issues/show_bug.cgi?id=4442 Rob Jacques <sandford@jhu.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |sandford@jhu.edu Resolution| |DUPLICATE --- Comment #1 from Rob Jacques <sandford@jhu.edu> 2010-07-09 23:20:00 PDT --- *** This issue has been marked as a duplicate of issue 2834 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation