Re: about destruct class object?
- From: John Cupitt ng-london org uk
- To: kasonhuang kinposh com cn
- Cc: gtk-list gnome org
- Subject: Re: about destruct class object?
- Date: Tue, 2 Apr 2002 12:37:18 +0100
¶À¼y Kason Huang wrote:
> hi:
> after i create a gtkbutton(useing gtk_button_new()),when i want to
destruct the gtkbutton,
> whether i need call gtk_widget_destroy(button) in my destruct function of
CGtkButton class encapsulated by myself.
Hi Kason, if you subclass a button, you don't need to destroy the button
yourself, just call the superclass destroy function. At the end of your
_destroy(), have something like:
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
John
==========================================================
Aelbert Cuyp 13 February - 12 May 2002
For information and tickets:
http://www.nationalgallery.org.uk/exhibitions/cuyp/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]