Re: [Bug 111028] Dealing with reference cycles in GObject
- From: Michael Meeks <michael ximian com>
- To: "J. Ali Harlow" <ali avrc city ac uk>
- Cc: Havoc Pennington <hp redhat com>, Gtk Hackers <gtk-devel-list gnome org>
- Subject: Re: [Bug 111028] Dealing with reference cycles in GObject
- Date: 25 Apr 2003 08:19:00 +0100
Hi Ali,
On Thu, 2003-04-24 at 17:51, J. Ali Harlow wrote:
> Net result: GdkPixmap returned to the user has reference count
> of 1 and the associated GdkImage also has a reference count
> of 1. This cycle will prevent the two objects ever being finalized
> unless somebody calls g_object_dispose() and the dispose()
> function was implemented.
Well; in order to break a reference loop you need to either use a weak
reference for one direction, or add a dispose method. The former is
preferable if it has to fit into an existing lifecycle pattern I
imagine.
Regards,
Michael.
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]