Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] Access violation on io_service::work destructor
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2010-09-23 10:05:38


Il 23/09/2010 15:52, Rutger ter Borg ha scritto:
> On 2010-09-23 15:28, Daniele Barzotti wrote:
>>
>> Ops..you're right!!
>>
>> I change my code with the following and now all seems to work as
>> expected!
>>
>
> That's odd. You are using a static shared pointer, so I would expect the
> reference count of pwork to be #objects + 1, not #objects.

Yes, but in my previous implementation I have created a plain pointer
and assigned to a shared_pointer through the reset() method which reset
all previous counting, so I had more shared_ptr "not really shared" :-)

Cheers,
Daniele.


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