D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3285 - Struct's destructor not called
Summary: Struct's destructor not called
Status: RESOLVED DUPLICATE of issue 3516
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 04:56 UTC by han
Modified: 2015-06-09 01:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description han 2009-09-03 04:56:39 UTC
import std.stdio;
struct S
{
  ~this()
   {
	writefln("die!");
   }
   void fun(){}

}
S fun()
{
    return S();
}
int main(char[][] args)
{
  fun().fun();
  ...
  return 0;
}

Struct's destructor not called .
Comment 1 Lionello Lunesu 2010-07-06 01:34:59 UTC

*** This issue has been marked as a duplicate of issue 3516 ***