GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Terminating application+

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
TriKri
Familiar Face


Joined: 19 Mar 2008
Posts: 14

PostPosted: Wed Mar 26, 2008 2:43 pm    Post subject: Terminating application+ Reply with quote

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.
Back to top
Wolfgang
Familiar Face


Joined: 05 Feb 2008
Posts: 37

PostPosted: Thu Mar 27, 2008 8:44 am    Post subject: Reply with quote

When your process ends, ENTIRE its memory is released.
Back to top
TriKri
Familiar Face


Joined: 19 Mar 2008
Posts: 14

PostPosted: Thu Mar 27, 2008 4:59 pm    Post subject: Reply with quote

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?
Back to top
Wolfgang
Familiar Face


Joined: 05 Feb 2008
Posts: 37

PostPosted: Thu Mar 27, 2008 5:04 pm    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP