Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::weak_ptr usage in multithreadedenvironments
From: strasser_at_[hidden]
Date: 2010-02-01 14:54:59


Zitat von Peter Dimov <pdimov_at_[hidden]>:

> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net