[Issue 6499] [GSoC] Destructor not called on object returned by method.
http://d.puremagic.com/issues/show_bug.cgi?id=6499 David Simcha dsim...@yahoo.com changed: What|Removed |Added Status|REOPENED|RESOLVED CC||dsim...@yahoo.com Resolution||FIXED --- Comment #6 from David Simcha dsim...@yahoo.com 2011-09-02 09:08:55 PDT --- The second fix has recently been merged and seems to work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6499] [GSoC] Destructor not called on object returned by method.
http://d.puremagic.com/issues/show_bug.cgi?id=6499 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2011-08-16 01:17:38 PDT --- https://github.com/D-Programming-Language/dmd/commit/cedaaa8927604ebc8b53ebb53c25e586eccd2755 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6499] [GSoC] Destructor not called on object returned by method.
http://d.puremagic.com/issues/show_bug.cgi?id=6499 Cristi Cobzarenco cristi.cobzare...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #3 from Cristi Cobzarenco cristi.cobzare...@gmail.com 2011-08-16 06:18:13 PDT --- Thanks for the fix Kenji. However, this still doesn't work if bar() is a template function, i.e: struct Bar { string m = not set; this( string s ) { writeln( Constructor - , m = s ); } this( this ) { writeln( Postblit- , m ); } ~this() { writeln( Destructor - , m ); } // NOTE: bar is a template, otherwise it works Bar bar()() { return Bar( bar ); } } Bar foo() { return Bar( foo ); } void main() { foo().bar(); } Outputs: Constructor - foo Constructor - bar Destructor - bar Interestingly, this time it's the one returned by foo() that doesn't get destroyed, rather than the one returned by bar(). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6499] [GSoC] Destructor not called on object returned by method.
http://d.puremagic.com/issues/show_bug.cgi?id=6499 --- Comment #4 from Kenji Hara k.hara...@gmail.com 2011-08-16 11:46:47 PDT --- https://github.com/D-Programming-Language/dmd/pull/316 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6499] [GSoC] Destructor not called on object returned by method.
http://d.puremagic.com/issues/show_bug.cgi?id=6499 --- Comment #5 from Cristi Cobzarenco cristi.cobzare...@gmail.com 2011-08-16 12:46:41 PDT --- Thanks a lot for the fix, this stops the memory leak I had in my project. Hope it gets merged into the head soon. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6499] [GSoC] Destructor not called on object returned by method.
http://d.puremagic.com/issues/show_bug.cgi?id=6499 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||patch, wrong-code CC||k.hara...@gmail.com --- Comment #1 from Kenji Hara k.hara...@gmail.com 2011-08-15 14:52:17 PDT --- https://github.com/D-Programming-Language/dmd/pull/313 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---