Re: Exit from a window but the process still alive.




Thanks, I connected the signal, but digging up at how an Gtk_Object gets destroyed I came accross the "finalize" method. It says that it's the last method invoked when destroying an object and it's only called when it's reference count is zero. I think that's the problem cause I'm setting the Gtk_window pointer to NULL and freeing it, and when tracing the program it just doesn't get to that part (probably due to the optimization stuff). But I think that the problem is tha the pointer to the window never gets freed really. Also, there are severeal pointers to different window componets laying around and I'm not freeing those either because they have been made by Glade. I think the problem is that I should be doing some cleaning up at the destroy signal handler, as you said, but I don't know what clean up I must do or how.


David Necas (Yeti) wrote:

On Tue, Sep 21, 2004 at 07:03:23PM +0200, Bruno G. San Alejo wrote:
  Hello everybody, when I exit from some applications I wrote myself
(for GNOME 2.6), the process is not killed though the window gets
killed. If I press the "X" button, it quits, but the process is still
alive.

You have to connect gtk_main_quit() to "destroy" signal of
the main window.  See the first section of Gtk+ tutorial:

   http://www.gtk.org/tutorial/ch-gettingstarted.html

Yeti


--
Do not use tab characters. Their effect is not predictable.



--
---------------------------------------------------
"Nunca antes en toda la Historia hemos visto compañias proteger los modelos de negocios basados en tecnologia obsoleta contra la destruccion creativa de nuevas tecnologias. ... El telegrafo no impidio el telefono, el tren no impidio el automovil."
---Howard Rheingold.

"Never before in history have we been able to see incumbent businesses protect business models based on old technology against creative destruction by new technologies. ... The telegraph didn't prevent the telephone, the railroad didn't prevent the automobile."
---Howard Rheingold.
---------------------------------------------------





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