
23 Sep
2010
23 Sep
'10
2:05 p.m.
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.