Boost logo

Boost Users :

From: gast128 (gast128_at_[hidden])
Date: 2007-07-24 07:33:36


Dear all,

I was playing with Boost.Signals and stumbles across a problem which required
something like the equivalent of a shared_connenction, i.e. the last reference
to it will finally disconnent.

This can of course be simulated with a boost::shared_ptr<scoped_connection>,
but native support for it is always preferable.

The use is that some change manager returns a connection which goes through
several application layers. The time the connection finally arives at
destination, it has felt multiple ctor's and dtors:

View::View(Doc* p)
 : m_con(p->Register(&OnUpdate)
{
}

shared_connection Doc::Register(void (View::* pmf)(), View* p)
{
  return m_pCm->Register(pmf, p)
}

etc..

Or did I not read the documentation properly?

Wkr,
me


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