RE: [sigc] RE: [gtkmm] Roadmap regarding sigc++2



> -----Original Message-----
> From: MHL Schulze t-online de [mailto:MHL Schulze t-online de] 
> > > 2. We need to investigate the low-level libsigc++ API 
> that allows us 
> > > to do strange connection/disconnection notification 
> things. A simple 
> > > compile against libsigc++ 2.0 would probably show these.
> > >
> > Well, this will be a bit harrier I guess. The only notification 
> > mechanism sigc++2 seems to provide (note that Martin is 
> more intimate 
> > with the code than me, so maybe I'm wrong here) is when a 
> > sigc::trackable object goes out of scope (sigc::trackable 
> is roughly 
> > comparable to SigC::Object in that respect). I guess with 
> sigc++ 1.2 
> > you could do more voodoo.
> 
> I think that it will be easier with libsigc++2 than with 
> libsigc++-1.2.
> libsigc++-1.2 has some heavy memory management code for Slot and
> Connection objects.
> 
> In libsigc++2 we have _copyable_ "closures" instead (I like 
> that name less and less). A connection can be thought of as a 
> closure that is held by a signal. If the signal dies or the 
> connection should be released the closure simply has to be 
> destroyed. This should operate well with glib signals.
> 
> Notification of glib signals when a trackable dies and 
> closures refering it should be destroyed is also very easy: 
> simply install a notification callback with 
> closure_base::set_parent() when "connecting" a closure to a 
> glib signal.

Thanks for the explanation and clues. This will be very useful later.

Murray Cumming
murrayc usa net
www.murrayc.com 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]