Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-23 08:45:04


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 23 April 2008 07:14 am, Daniel Frey wrote:
> In the meantime, I noticed another improvement, see the attached patch.
> Looking at the comments just above init_internal_shared_once(), this
> seems to open up even more optimization possibilities. Since I think you
> wrote it and I don't know the internals as well as you, maybe you could
> elaborate on the comment and what could be improved given that the
> pointer inside of the deleter is not used anyway...

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.

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.

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIDy9V5vihyNWuA4URAuhBAJ0bCdrchMkzigM3c+vssgbtPQDLOwCghWhv
jwYg/eSswNaYltXeBFX47js=
=Y2UL
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk