2003-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>

* generator/SignalHandler.cs: the generated Dispose method now calls
	base.Dispose and always disconnects the handler. Thanks to
	Petr Danecek <danecek@ucl.cas.cz>.

svn path=/trunk/gtk-sharp/; revision=12060
This commit is contained in:
Gonzalo Paniagua Javier 2003-02-28 10:55:59 +00:00
parent 5fa688fb04
commit 4465050e40
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2003-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* generator/SignalHandler.cs: the generated Dispose method now calls
base.Dispose and always disconnects the handler. Thanks to
Petr Danecek <danecek@ucl.cas.cz>.
2003-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* api/gdk-api.xml:

View file

@ -187,10 +187,11 @@ namespace GtkSharp.Generation {
sw.WriteLine("\t\tprotected override void Dispose (bool disposing)");
sw.WriteLine("\t\t{");
sw.WriteLine("\t\t\t_Instances.Remove(_key);");
sw.WriteLine("\t\t\tif(_Instances.Count == 0) {");
sw.WriteLine("\t\t\t\tg_signal_handler_disconnect (_raw, _HandlerID);");
sw.WriteLine("\t\t\tif(_Instances.Count == 0)");
sw.WriteLine("\t\t\t\t_Delegate = null;");
sw.WriteLine("\t\t\t}");
sw.WriteLine();
sw.WriteLine("\t\t\tg_signal_handler_disconnect (_raw, _HandlerID);");
sw.WriteLine("\t\t\tbase.Dispose (disposing);");
sw.WriteLine("\t\t}");
sw.WriteLine("\t}");
sw.WriteLine("}");