Re: [Boost-bugs] [Boost C++ Libraries] #10100: [signals2] trackable fails to disconnect slot on deletion

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10100: [signals2] trackable fails to disconnect slot on deletion
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-06-11 07:38:36


#10100: [signals2] trackable fails to disconnect slot on deletion
-------------------------------+----------------------
  Reporter: wim@… | Owner: fmhess
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: signals2
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------

Comment (by wim@…):

 After reading the implementation of trackable, I assumed you were using
 the shared pointer there to detect deletion before invoking the signal.
 That's a great idea, why not keep it? I understand that using the
 shared_ptr to prevent deletion is the method of operation when you use
 signals2 with shared_ptr managed objects, but that's probably not possible
 for objects not tracked through shared_ptr.

 Just a suggestion (I'm not aware of the implementation details of
 signals2, so I can't make any well-educated decisions on feasibility):
 since preventing deletion of objects not tracked by shared_pointers is not
 possible after all, it's maybe easier to omit them in the call stack of
 the signal emission, or to replace them by weak_ptr, rather than to
 replace the implementation of trackable? For shared_ptr-tracked objects,
 you keep the shared_ptr.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10100#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC