Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-23 15:18:32

Hash: SHA1

On Wednesday 23 April 2008 14:33 pm, Daniel Frey wrote:
> On Wed, 2008-04-23 at 08:45 -0400, Frank Mori Hess wrote:
> > The comment is obsolete, now that the pointer value is calculated in the
> > shared_from_this() calls. Yes, the deleter_wrapper only needs a
> > shared_count.
> The comment suggest that the lazy initialization is just a work-around
> for the more desirable initialization during the ctor. Is this no longer
> true?

If you initialize in the constructor, you have to always create a
deleter_wrapper. Currently, one is only created if you need it. I'd guess
you would find the current behavior preferrable.

> > And what I was getting at before, _internal_shared_count could be made a
> > local variable in init_internal_shared_once(), if you add a line where
> > you stuff it inside its own deleter_wrapper. Anywhere else it is used,
> > it can be obtained from _internal_weak_count.
> I think we should pick the low-hanging fruits first. If it's OK for you
> I'll apply the attached patch.

It's fine.

> For the vtable, we could remove it by switching shared_from_this from a
> member function to a free function that takes T* as a parameter, but
> that's of course a breaking change...

Didn't you propose something before like implementing the current esft
interface as a derived class from a vtable-free base class that uses the free
function approach? The last thing I saw from Peter about that was it needed
to maintain compatibility.

- --
Version: GnuPG v1.4.6 (GNU/Linux)


Boost list run by bdawes at, gregod at, cpdaniel at, john at