Never called destructor
div0 at users.sourceforge.net
Sat Mar 27 07:08:36 PDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
> div0 wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
> Same as bug 3285 / bug 3516?
No, they are for structs, not classes.
I had a bit more of a play, and it seems that the scope object is on the
stack, so it's memory is reclaimed, but the destructor is called for
the y object instead.
It would be much simpler just to disallow reassignment of the scope var
and probably it should not be allowed to assign the ref of a scope
object to another reference either to stop you accidentally escaping the
Also 3566 is a related bug. So delete of a scope var needs to go as well.
My enormous talent is exceeded only by my outrageous laziness.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-learn