diff --git a/ChangeLog b/ChangeLog index dbda13884..c0ad5715a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-09-22 Brad Taylor + + * glib/Idle.cs: + * glib/Timeout.cs: Don't try to remove the handler from the managed + hashtable twice, add a comment explaining the need for the else branch. + 2009-09-22 Brad Taylor * glib/Idle.cs: diff --git a/glib/Idle.cs b/glib/Idle.cs index 953cd7c7f..9bfc01ac7 100755 --- a/glib/Idle.cs +++ b/glib/Idle.cs @@ -58,10 +58,14 @@ namespace GLib { protected virtual void Dispose (bool disposing) { + // Both branches remove our delegate from the + // managed list of handlers, but only + // Source.Remove will remove it from the + if (disposing) Remove (); - - Source.Remove (ID); + else + Source.Remove (ID); } public bool Handler () diff --git a/glib/Timeout.cs b/glib/Timeout.cs index faedf50b9..9aa348af5 100755 --- a/glib/Timeout.cs +++ b/glib/Timeout.cs @@ -55,10 +55,15 @@ namespace GLib { protected virtual void Dispose (bool disposing) { + // Both branches remove our delegate from the + // managed list of handlers, but only + // Source.Remove will remove it from the + // unmanaged list also. + if (disposing) Remove (); - - Source.Remove (ID); + else + Source.Remove (ID); } public bool Handler ()