From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2005-10-22 02:14:42
|
Do not reply to this via email (we are currently unable to handle email responses and they get discarded). You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=3D319204 gnome-perl | Gtk2 | Ver: unspecified ------- Additional Comments From muppet 2005-10-22 02:14 ------- Some notes from stepping through the source: GdkColor is 1xsizeof(guint32)+3*sizeof(guint16) =3D 4+3*2 =3D 12 bytes. = I would not be surprised if the=20 compiler padded this to 16 on ia64. GdkColors are allocated using a GMemChunk -- that is, a fixed-size alloca= tor. You will see the same=20 addresses over and over, and garbage from previous uses will remain in me= mory.=20 gtk_color_selection_get_color() does not alter the value of pixel in the = passed-in GdkColor; it only=20 modifies red, green, and blue. g_object_get() copies boxed objects by default. The implementation of gd= k_color_copy() bumps to the=20 next free spot in the GMemChunk and then does *new_color =3D *color, whic= h means that the value of=20 pixel is copied in ->get(), unlike with $selection->get_color(). Gtk2 uses the default GPerlBoxedWrapperClass for dealing with GdkColors, = so the pointer held by the=20 sv that you see in perl actually points to another block of memory which = contains the GType of the=20 object, the pointer to it, and a flag that says whether we should kill th= e boxed object on DESTROY. ------- You are receiving this mail because: ------- You are the assignee for the bug. |