Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-01 01:07:58

The docs for trackable really caused me a lot of misery as well. They

  "The trackable class is responsible for managing the automatic
  disconnection of signals and slots when an object that is bound as
  part of a slot is destroyed."

But this makes no sense, since the slot function is copied, and its
lifetime is managed by the signal. If an object is bound as part of a
slot, that object is copied, and the signal controls its lifetime
forever. What you meant to say was:

   "...when a pointer or reference to an object that is bound as part
   of a slot is destroyed."



  Effects: disconnects all connected slots.

is completely inadequate. Of course it doesn't disconnect all
connected slots! It disconnects the slots which contain a pointer or
reference to this trackable object which is reachable via invoking
visit_each on a slot function... or something like that.

Also, the trackable docs really need some examples. I see there are
some perfectly good ones in libs/signals/test and
libs/signals/example. You should just throw one of those into the

Incidentally, you might consider integrating with boost::weak_ptr -
just a thought.

                    David Abrahams
dave_at_[hidden] *

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