Bug in RefCounted?

Ali Çehreli acehreli at yahoo.com
Sun Oct 27 16:33:55 PDT 2013


On 10/27/2013 03:04 PM, monarch_dodra wrote:

 > it *could* be an (older) emplace bug. Do you reproduce with head?

I had tested it with head. No, doesn't happen on head.

 > Also, keep in mind that DMD *is* allowed to destroy the same
 > object several times.

That's news to me. I know that objects may never be destroyed but why 
multiple times? How many lives do they have? ;)

 > YOur destructor should look like this:

 > ~this()
 > {
 >       if (foo)
 >           destroyFoo(foo);
 >       foo = null;
 > }

Welcome back to C. :p

Ali



More information about the Digitalmars-d-learn mailing list