[Issue 3516] Destructor not called on temporaries

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3516

Andrei Alexandrescu  changed:

   What|Removed |Added

Version|2.032   |D2

--


[Issue 3516] Destructor not called on temporaries

2011-06-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Don  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #12 from Don  2011-06-27 03:06:44 PDT ---
Closing this bug, as all of the test cases in this report now work, and
destructors are also called when exceptions are present:

https://github.com/D-Programming-Language/dmd/commit/41abb2b915d1c826af83a2c8cba5f6fb646d1089

If there are any remaining cases where destructors are not called, they should
be reported as a different bug.

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


[Issue 3516] Destructor not called on temporaries

2011-04-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Vladimir  changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com


--- Comment #11 from Vladimir  2011-04-26 05:19:34 
PDT ---
The test case in comment #3 now passes with DMD git HEAD, and this bug is now
listed as fixed in the DMD changelog.

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


[Issue 3516] Destructor not called on temporaries

2010-11-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Max Samukha  changed:

   What|Removed |Added

 CC||samu...@voliacable.com


--- Comment #10 from Max Samukha  2010-11-14 03:09:58 
PST ---
This one is critical for QtD. Can it be fixed soon?

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


[Issue 3516] Destructor not called on temporaries

2010-09-22 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516



--- Comment #9 from Don  2010-09-22 04:05:41 PDT ---
*** Issue 4613 has been marked as a duplicate of this issue. ***

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


[Issue 3516] Destructor not called on temporaries

2010-09-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


a...@aligature.com changed:

   What|Removed |Added

 CC||a...@aligature.com


--- Comment #8 from a...@aligature.com 2010-09-20 08:51:34 PDT ---
This bug also seems like it could be the cause of

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

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


[Issue 3516] Destructor not called on temporaries

2010-08-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


SHOO  changed:

   What|Removed |Added

   Priority|P2  |P3
 CC||zan77...@nifty.com


--- Comment #7 from SHOO  2010-08-23 09:52:25 PDT ---
Upvoted.
By recent usage of struct, this bug is serious. This should be supported
quickly.

I suspect that these may be connected with each other:
http://d.puremagic.com/issues/show_bug.cgi?id=4712

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


[Issue 3516] Destructor not called on temporaries

2010-07-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Andrei Alexandrescu  changed:

   What|Removed |Added

 CC||and...@metalanguage.com


--- Comment #6 from Andrei Alexandrescu  2010-07-10 
06:25:14 PDT ---
Upvoted.

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


[Issue 3516] Destructor not called on temporaries

2010-07-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Adrian Matoga  changed:

   What|Removed |Added

 CC||e...@atari8.info


--- Comment #5 from Adrian Matoga  2010-07-10 06:11:10 PDT ---
Still active in 2.047,

testcase:

import std.stdio;
struct A
{
int a;
this(int a) { this.a = a; writeln("hello, ", a); }
~this() { writeln("bye, ", a); }
void doSth() { writeln("something"); }
}
void main()
{
auto a1 = A(1);
a1.doSth();
A(2).doSth();
}

produces:

hello, 1
something
hello, 2
something
bye, 1

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


[Issue 3516] Destructor not called on temporaries

2010-07-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Lionello Lunesu  changed:

   What|Removed |Added

 CC||yaocheng...@gmail.com


--- Comment #4 from Lionello Lunesu  2010-07-06 
01:34:59 PDT ---
*** Issue 3285 has been marked as a duplicate of this issue. ***

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


[Issue 3516] Destructor not called on temporaries

2010-05-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Brad Roberts  changed:

   What|Removed |Added

 CC||bra...@puremagic.com


--- Comment #3 from Brad Roberts  2010-05-30 15:59:09 PDT 
---
Reduced test case:
extern(C) int printf(const char*, ...);

int numctor, numdtor;

struct Tid
{
this(int i) { ++numctor; }
~this() { ++numdtor; }
}

Tid f() { return Tid(1); }

// This temporary is destroyed
void test1() { Tid tid = f(); }

// This (invisible) temporary is never destroyed
void test2() { f(); }

void main()
{
numctor = numdtor = 0;
test1();
printf("numctor = %d, numdtor = %d\n", numctor, numdtor);
assert(numctor == 1);
assert(numdtor == 1);

numctor = numdtor = 0;
test2();
printf("numctor = %d, numdtor = %d\n", numctor, numdtor);
assert(numctor == 1);
assert(numdtor == 1);
}

Current results:
numctor = 1, numdtor = 1
numctor = 1, numdtor = 0
core.exception.asserter...@bug3516(31): Assertion failure

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


[Issue 3516] Destructor not called on temporaries

2010-01-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Don  changed:

   What|Removed |Added

   Severity|major   |critical


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


[Issue 3516] Destructor not called on temporaries

2009-11-29 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516


Leandro Motta Barros  changed:

   What|Removed |Added

 CC||l...@stackedboxes.org


--- Comment #2 from Leandro Motta Barros  2009-11-29 
03:21:36 PST ---
I don't know if this is useful information, but I've been bitten by this same
bug under Linux with DMD 2.036.

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


[Issue 3516] Destructor not called on temporaries

2009-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3516



--- Comment #1 from Bartosz Milewski  2009-11-16 16:31:43 
PST ---
*** Issue 3518 has been marked as a duplicate of this issue. ***

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