c++/654: destructor called without constructor

nkiesel@tbdnetworks.com nkiesel@tbdnetworks.com
Wed Oct 18 02:06:00 GMT 2000


>Number:         654
>Category:       c++
>Synopsis:       destructor called without constructor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 02:06:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Norbert Kiesel
>Release:        gcc-2.95.2
>Organization:
>Environment:
Solaris 5.7
>Description:
When running the sample code below, the Data::~Data() is
called before leaving getData(), but Data::Data() is never
called.
>How-To-Repeat:

>Fix:
Workaround: add "return Data();" to the body of getData();
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="typescript"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="typescript"

U2NyaXB0IHN0YXJ0ZWQgb24gV2VkIDE4IE9jdCAyMDAwIDAxOjQ1OjMxIEFNIFBEVAokIGdjYyAt
diAtc2F2ZS10ZW1wcyB0LmNwcApSZWFkaW5nIHNwZWNzIGZyb20gL3Vzci9sb2NhbC9saWIvZ2Nj
LWxpYi9zcGFyYy1zdW4tc29sYXJpczIuNy8yLjk1LjIvc3BlY3MKZ2NjIHZlcnNpb24gMi45NS4y
IDE5OTkxMDI0IChyZWxlYXNlKQogL3Vzci9sb2NhbC9saWIvZ2NjLWxpYi9zcGFyYy1zdW4tc29s
YXJpczIuNy8yLjk1LjIvY3BwIC1sYW5nLWMrKyAtdiAtRF9fR05VQ19fPTIgLURfX0dOVUdfXz0y
IC1EX19HTlVDX01JTk9SX189OTUgLURfX2NwbHVzcGx1cyAtRHNwYXJjIC1Ec3VuIC1EdW5peCAt
RF9fc3ZyNF9fIC1EX19TVlI0IC1EX19zcGFyY19fIC1EX19zdW5fXyAtRF9fdW5peF9fIC1EX19z
dnI0X18gLURfX1NWUjQgLURfX3NwYXJjIC1EX19zdW4gLURfX3VuaXggLUFzeXN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