Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::bind memory leak
From: Nevin Liber (nevin_at_[hidden])
Date: 2010-11-13 12:14:26


2010/11/13 bit bit <g_rambot_at_[hidden]>

>
> (which doesn't allocate memory).
>
> >>>>>>>>>>>>>>
>
> That's not true.
> Check this out..
>
> shared_count.hpp
>

Please don't quote out of context. I stated that bind doesn't allocate
memory. It doesn't. shared_count,hpp is part of shared_ptr, not bind.

That's what causes the leak.
>

You throwing from a deleter which you know is only called from the
shared_ptr destructor is what is causing the leak. If you throw from a
destructor, all bets are off.

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404


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