Skip to content
This repository has been archived by the owner on Nov 6, 2018. It is now read-only.

PhysicalFilesWatcher and PhysicalFileProvider should implement IDisposable #132

Closed
dougbu opened this issue Oct 13, 2015 · 2 comments
Closed
Assignees
Milestone

Comments

@dougbu
Copy link
Member

dougbu commented Oct 13, 2015

PhysicalFilesWatcher holds system resources in its FileSystemWatcher field. But PhysicalFilesWatcher and the (public) PhysicalFileProvider class containing the watcher do not implement IDisposable. System resources are therefore not released until finalization.

@muratg
Copy link

muratg commented Oct 20, 2015

@dougbu Was this a CR find, or were you investigating some leak?

@dougbu
Copy link
Member Author

dougbu commented Oct 20, 2015

Found this when investigating file system limits hit (aka FileSystemWatcher leaks) doing functional testing w/ DNX Core on Linux. We realized our use of TestServer was a mess for other reasons and moved those tests to use an xUnit fixture. That minimized our TestServer count enough for testing in this environment. But not all PhysicalFileProvider instances are pinned by the server so customers could hit similar issues.

@Tratcher and I discussed the issue back then and I finally got around to filing it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants