[Issue 5353] clear function is calling the destructor twice

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 14 14:02:30 PST 2010


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


nfxjfg at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfxjfg at gmail.com


--- Comment #1 from nfxjfg at gmail.com 2010-12-14 14:00:42 PST ---
I think it's only because the GC calls the destructor AGAIN, when the programs
exits. This is as designed. First, the clear() function doesn't delete the
object. Second, the GC calls dtors on all live objects on exit. Thus, the dtor
is called twice.

So, this bug is likely INVALID.

As for the clear() function, its design is an embarrassment.

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


More information about the Digitalmars-d-bugs mailing list