GtkAccelGroup - when to deallocate?
- From: "Norman Black" <stonybrk ix netcom com>
- To: "gtk-app-devel-list" <gtk-app-devel-list gnome org>
- Subject: GtkAccelGroup - when to deallocate?
- Date: Tue, 26 Sep 2000 13:46:33 -0700
I have a transient dialog which has some accelerators in an accel group.
The group is added to the dialog window.
When the window is destroyed is the accel group also destroyed if nothing
else references the accel group. Accel groups are not objects and are
undocumented (reference manual) so I do not know exactly how they operate
regarding memory resources.
I notice that accel groups have a reference counting mechanism and no
"sink". I assume accel groups start (after "new") with a reference count of
1?
Does gtk_window_add_accel_group increment the accel group reference count?
Does gtk_window_add_accel_group decrement the accel group reference count
when removed, or destroyed?
In other words once I add the accel group to the window I can do an unref
and the accel group will auto deallocate when the window dies.
Best Regards,
Norman Black
Stony Brook Software
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]