Re: [gtk-list] A simple question



The tutuorial on the site (www.gtk.com) answers most of these questions
and more.  It's not comprehensive yet, but the source code with the
examples should go a long way towards answer some of your questions.

Closing a window is done with the gtk_widget_destroy function.  

Widgets are automatically destroyed when they're no longer needed.  They
should be freeing up all their associated memory too.

Widgets usually make a copy of strings when, for instance, you are
creating a button with a label.  You can always look at the source for
the widget creation function if you're unsure.  Just don't expect any
comments in the code.  :p

 -Eric

--- John Burton <john@jbmail.com> wrote:
> I'm just starting with gtk and have a simple question
> I can't find the
> answer to anywhere in the documents I can find :-
> 
> How do I "close" a window? Also, do I need to do
> anything to free the
> memory
> allocated to widgets when they are no longer needed?
> 
> Also, when I create (say) a button with a text label,
> does gtk make a
> copy of the
> string I pass as the label text and free it
> appropriately, or do I have
> to do
> something myself?
> 
> If there are any documents that describe this, I'd
> appreciate
> information on
> where to find them.
> 
> -- 
> To unsubscribe: mail -s unsubscribe
> gtk-list-request@redhat.com < /dev/null
> 
> 

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]