diff options
Diffstat (limited to 'Ivy/Ivy.cs')
-rw-r--r-- | Ivy/Ivy.cs | 30 |
1 files changed, 28 insertions, 2 deletions
@@ -27,7 +27,7 @@ namespace IvyBus /// <summary> The Main bus Class
/// </summary>
///
- public class Ivy
+ public class Ivy : IDisposable
{
/* Event */
/// <summary>
@@ -1410,5 +1410,31 @@ namespace IvyBus return valid;
}
- }
+
+ #region IDisposable Membres
+ // needed by tcplistener_running
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ // Free other state (managed objects).
+ if (tcplistener_running != null)
+ {
+ tcplistener_running.Close();
+ tcplistener_running = null;
+ }
+ }
+ // Free your own state (unmanaged objects).
+ // Set large fields to null.
+
+ }
+
+ #endregion
+ }
}
\ No newline at end of file |