On Thursday, 24 October 2013 at 16:40:42 UTC, Jesse Phillips wrote:
I answered a question related to RefCount on SO
http://stackoverflow.com/questions/4632355/making-a-reference-counted-object-in-d-using-refcountedt/4635050#4635050

Not written to your specific problem, but may give you the information you need.

Thanks, that did help. Still, I think there's something strange going on.

The problem is that RefCounted calls the FooWrapper destructor twice, one time with a garbage foo pointer. The example prints:
Destroying Foo 40CED748
Destroying Foo 4002DFF0
There is only one Foo instance created. A null pointer would make sense, but where's that second pointer coming from?

Reply via email to