Re: [gtk-vnc-devel] Thoughts about widgets
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] Thoughts about widgets
- Date: Tue, 18 Mar 2008 14:34:39 +0000
On Tue, Mar 18, 2008 at 11:22:41AM -0300, Jonh Wendell wrote:
> Hi, folks.
>
> I was wondering why vncdisplay widget destroys itself. Isn't up to the
> container destroy its children?
It doesn't destroy itself directly - GTK widgets are reference countered.
The VNC display object increments the reference count when the coroutine
starts, and decrements it when the coroutine exits. This last action
may or may not actaully destroy the widget - it depends on whether
the parent container has already released its own reference.
We need the reference counting, because if we didn't have it, then the
container could destroy the widget while the coroutine is still running.
Dan.
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]