User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060727 Firefox/1.5.0.5 (Swiftfox) Build Identifier: rev 22427 Use the slice allocator to reduce the memory overhead in netk. Reproducible: Always Steps to Reproduce:
Created attachment 682 Slice allocator patch
We should use g_type_class_add_private() for private data anyway, that way the private data is simply added to the instance size.
Just discovered this function, 2 mins after the patch was commited (i wonderd how gtk does this). I'll create a new patch.
Created attachment 686 Use _type_class_add_private and other fixes * Use g_type_class_add_private * Add NETK_*_GET_PRIVATE definition * Remove g_free (..->priv) from the finalize function * Use G_OBJECT where possible * Use GObjectClass for the parent_class * Update netk-class-group.c to follow the style * Use gtk_widget_destroy again to destroy the action menu. This patch was added to libwnck, but it produces the following warning: called g_object_unref() on an object that had only a floating reference; the initial floating reference is not owned by anyone and must be removed with gtk_object_sink() after a normal reference is obtained with g_object_ref().
(In reply to comment #4) > * Use gtk_widget_destroy again to destroy the action menu. > This patch was added to libwnck, but it produces the > following warning: > called g_object_unref() on an object that had only a floating > reference; the initial floating reference is not owned by anyone > and must be removed with gtk_object_sink() after a normal > reference is obtained with g_object_ref(). g_object_ref()+gtk_object_sink() the menu after creating it, and g_object_unref() it to delete it. gtk_widget_destroy()/gtk_object_destroy() simply disposes the object and emits "destroy".
(In reply to comment #5) > g_object_ref()+gtk_object_sink() the menu after creating it, and > g_object_unref() it to delete it. gtk_widget_destroy()/gtk_object_destroy() > simply disposes the object and emits "destroy". > Well this is the situation how it was before bug #1874, and that always worked. Tnx for the info.
Created attachment 687 Use g_type_class_add_private in libxfcegui4-icon theme * Use g_type_class_add_private * Remove tabs
Created attachment 689 Use g_type_class_add_private and other fixes v2 Save as the previous netk patch, but with the following things added: * Added support macros for the slice allocator * Use slice allocator where possible (ActionMenuData, LayoutManager and NetkIconCache) * Fix layout in netk-window-action-menu.c
Created attachment 719 Use g_type_class_add_private in xfce-appmenuitem
The changes seem reasonable. Should we commit that for rc1? Any opinions?
I'm runnign this patch from the first moment (duh ^_^) and there were no weird slice alloc crashes, so I think it's safe. Also tried the netk test applications, no problems.
If you want I can post 1 patch against the latest rev, which includes all the 3 patches above.
Yes, please post a combined patch.
Created attachment 736 Slice and Private against rev 22778
Committed with revision 22783.