summaryrefslogtreecommitdiff
path: root/Ivy/IvyWatcher.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ivy/IvyWatcher.cs')
-rw-r--r--Ivy/IvyWatcher.cs56
1 files changed, 28 insertions, 28 deletions
diff --git a/Ivy/IvyWatcher.cs b/Ivy/IvyWatcher.cs
index f239b99..630472d 100644
--- a/Ivy/IvyWatcher.cs
+++ b/Ivy/IvyWatcher.cs
@@ -26,7 +26,7 @@ namespace IvyBus
/// that the broadcast is done using the same socket, which is not a good
/// thing.
/// </remarks>
- internal class IvyWatcher //: IDisposable
+ internal class IvyWatcher : IDisposable
{
private Ivy bus; /* master bus controler */
private int port;
@@ -194,32 +194,32 @@ namespace IvyBus
stream.sendMsg(EPhost, bus.applicationPort, bus.AppId, bus.AppName);// notifies our arrival on each domain: protocol version + port
}
}
- // Not needed for pure managed object ??!!!
-
- //#region IDisposable Membres
-
- //public void Dispose()
- //{
- // Dispose(true);
- // GC.SuppressFinalize(this);
- //}
-
- //protected virtual void Dispose(bool disposing)
- //{
- // if (disposing)
- // {
- // // Free other state (managed objects).
- // if (stream != null)
- // {
- // stream.Close();
- // stream = null;
- // }
- // }
- // // Free your own state (unmanaged objects).
- // // Set large fields to null.
-
- //}
-
- //#endregion
+ // needed for IvyUDPStreamV4', 'IvyUDPStreamV3 managed object ??!!!
+
+ #region IDisposable Membres
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ // Free other state (managed objects).
+ if (stream != null)
+ {
+ stream.Close();
+ stream = null;
+ }
+ }
+ // Free your own state (unmanaged objects).
+ // Set large fields to null.
+
+ }
+
+ #endregion
}
} \ No newline at end of file