Re: [Bug 111028] Dealing with reference cycles in GObject
- From: Tor Lillqvist <tml iki fi>
- To: "J. Ali Harlow" <ali avrc city ac uk>
- Cc: Owen Taylor <otaylor redhat com>, gtk-devel-list gnome org
- Subject: Re: [Bug 111028] Dealing with reference cycles in GObject
- Date: Sat, 26 Apr 2003 01:43:20 +0300
J. Ali Harlow writes:
> I found that the GdkPixmap->GdkImage reference really isn't
> important. It's only really there to have somewhere convenient to
> store the location of the pixel data in the pixmap and as an easy
> way of accessing the dimensions of that data.
Yup.
(On the other hand, even with your fix, can't one also say that the
GdkImage->GdkPixmap reference is only there to have a convenient
holder for the pixel data in the image. It also makes the blitting
code simpler, as it only has to handle windows and pixmaps.)
> I have therefore put together a fix which removes this reference
> entirely which seems to solve the problem.
Your fix seems straightforward enough, and removes some
complexity. (On the other hand it duplicates the pixel pointer for
GdkImages, it is now both in image::mem and pixmap::bits. No big
deal.) If it indeed fixes a problem and doesn't cause any new ones,
I'm all for applying it.
(Have you tested your fix in 256-colour mode?)
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]