[Gtk-sharp-list] Gnome.About instance after pressing the OK button

Philip Van Hoof spamfrommailing@freax.org
15 Jun 2003 17:34:44 +0200

I think that if you create an instance of the Gnome.About and the user
presses "Ok" on that window; that the instance is left incorrectly. I
think that the Raw variable used internally in gtk-sharp is left
unintialized because Gtk+ will destroy that object in memory after the
[Ok] button has been pressed..

It's possible that I am wrong here, so please first check.

Solution .. gtk-sharp should connect to the Response and Close events
and destroy the object "this" ...

What I tested was this :

public class Something
  Gnome.About ab;

  public Something () {


  private void OnAboutButtonClicked (object o, EventArgs args) {
	if (ab == null) {
	    ab = new Gnome.About (.....);


What I expected was that ab would be null once and the other times I
click that Button it would use the existing instance. In stead this
throws an NullPointerException. My best guess is that ab the second time
won't be null but the internal object "Raw" of Gnome.About has been
destroyed because the user pressed "Ok". 

Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
work: Philip dot VanHoof at cronos dot be
http://www.freax.be, http://www.freax.eu.org