
1 Feb
2010
1 Feb
'10
7:54 p.m.
Zitat von Peter Dimov
Everything you describe sounds fine, at least in principle. There could be a bug in weak_ptr, a bug in your logic somewhere, or a bug in Snow Leopard's gcc (such things have happened in the past). If you
I doubt it is a bug in weak_ptr, weak_ptr::lock() is pretty much the same code as copying a shared_ptr. (see constructors of shared_count). have you tried valgrind? afaik there is an experimental port for mac os. if shared_ptr/weak_ptr delete an object that is still in use valgrind should catch that.