[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patches for the sheet branch
From: |
John Darrington |
Subject: |
Re: Patches for the sheet branch |
Date: |
Sun, 8 Jul 2012 07:33:18 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sat, Jul 07, 2012 at 10:00:40PM -0700, Ben Pfaff wrote:
John Darrington <address@hidden> writes:
So is this an accurate summary of your take?
- Don't implement GtkObject.destroy in new code.
- Implement unrealize to undo everything done by realize and
release Gdk resources.
- Implement dispose to just unref objects.
- Implement finalize to do other cleanup.
That would be a reasonable summary. I don't claim that it's 100%
correct - but you asked for rules of thumb.
> I changed the var_sheet and data_sheet to keep a reference to the uim
> objects which they return from their _get_ui_manager objects. One
> of the comments in the code (which I removed in another commit),
mentioned
> that there were problems when the final reference to uim was unreffed.
> This change fixed that problem, by ensureing that it wasn't finalised,
> until the object which owned it was disposed. In fact, I think that a
> later commit, made this change unecessary - at least it should be, once
> all the dispose/finalise methods are in order.. But it can't to a lot of
> harm keeping this extra ref.
Would you mind organizing the commits or editing the commit
messages to better explain the above?
I'll do that.
> The patch "Reduce the flicker when redrawing the toolbar and
> menubar." appears to leak a reference in
> psppire_data_editor_split_window(). At least, I see nothing that
> will eventually unref de->old_vbox_widget.
>
> I think you're right. But when I add a call to _unref in dipose, it
> provokes a Critical. This needs more investigation. I think the problem
> is that make_{single,split}_datasheet returns a floating object. They
> should probably call g_object_ref_sink.
OK. Can you add a comment in psppire_data_editor_split_window()
mentioning the leak? Otherwise we'll forget about it.
OK.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature