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

Re: [virt-tools-list] [PATCH virt-viewer 10/19] Use virt_viewer_connect_object() for display



On Tue, Jul 17, 2012 at 01:11:50PM +0200, Marc-André Lureau wrote:
> On Tue, Jul 17, 2012 at 11:26 AM, Christophe Fergeau
> <cfergeau redhat com> wrote:
> > On Mon, Jul 16, 2012 at 06:57:45PM +0200, Marc-André Lureau wrote:
> >> When display is released, detach signal automatically
> >
> > Same question as the similar patch before, why? I'm assuming that it's
> > because we are going to handle displays dynamically, and if we don't do
> > that, we'll sometimes end up with signals using dead objects?
> 
> Yeah, I don't have a backtrace, but you can get into various crash
> related to not cleaning up signal handlers properly. 

Just add this to the commit log.

> In general, this
> signal_connect helper is really awesome, as you don't have to worry
> about either emitter or receiver being dead, but some time you may
> prefer to actually crash if something goes wrong. So a systematic
> replace isn't what I would recommend. But for Spice channel & display,
> it is needed to cleanup if either of the two is destroyed.

I agree using it makes sense, but it's useful for the review, or for future
bisections to know if it fixes a bug, or if it's in preparation for future
changes, ...
As far as I know, signal handlers will get cleaned up when the emitter goes
away, so the main advantage of this function is of being a working
g_signal_connect_object implementation which disconnects the signal handler
when user_data goes away.

Christophe

Attachment: pgpJXX9x2JFaN.pgp
Description: PGP signature


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