GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Apr 16, 2014 10:16 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Terminating application+
PostPosted: Wed Mar 26, 2008 2:43 pm 
Offline
Familiar Face

Joined: Wed Mar 19, 2008 3:23 pm
Posts: 19
Hello!

When I press escape in my program, I call gtk_main_quit();. The window with all things inside disappears. But is there some other function I should call to release the widgets I have created? I have created a window with gtk_window_new(), what happens to that window? Is the memory still in use or has it been freed?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 8:44 am 
Offline
GTK+ Guru

Joined: Tue Feb 05, 2008 8:39 am
Posts: 130
When your process ends, ENTIRE its memory is released.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 4:59 pm 
Offline
Familiar Face

Joined: Wed Mar 19, 2008 3:23 pm
Posts: 19
Well, my program does end after gtk ends its main loop. But what about if your program doen't end, if it is going to minimize to the tray for example and want to destroy all widgets because of that reason?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 5:04 pm 
Offline
GTK+ Guru

Joined: Tue Feb 05, 2008 8:39 am
Posts: 130
In this case it's enough to destroy main window. For destroing widgets responds its parent. To escape special cases, in which memory leaks are possible, see documentation.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group