Addressing PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/6608a22b9686c1f4ebbfa665d610eb85d82273d3
This commit is contained in:
Jonathan Miller committed 2015-03-24 15:52:28 -07:00
1 parent deec93fb6f
commit b183d088c0
1 file changed
+7
@@ -127,6 +127,7 @@ namespace System.IO
{
Debug.Assert(_eventStream == IntPtr.Zero);
Debug.Assert(_watcherRunLoop == IntPtr.Zero);
Debug.Assert(_callback == null);
// Make sure we only do this if there is a valid directory
if (String.IsNullOrEmpty(_directory) == false)
@@ -191,6 +192,12 @@ namespace System.IO
Interop.CoreFoundation.CFRelease(_eventStream);
_eventStream = IntPtr.Zero;
}
// Cleanup the callback
if (_callback != null)
{
_callback = null;
}
}
private void RestartStream()