Skip to content

Potential MemLeak because IFileSystemWatcher does not implement IDisposable #469

@BADF00D

Description

@BADF00D

Hi,
I just stumble upon the fact, that IFileSystemWatcher is not IDisposable, but all its Implementation are. When I retrieve an instance from IFileSystemWatcherFactory, I have no hint that I have to dispose this instance. Which can lead to memory leaks. Given that FileSystemWatcher is a system resource, it might also be there after my program finished.

For me there are two solution to this problem:

  1. Make IFileSystemWatcher IDisposable (my preferred solution).
  2. Add a Release method to IFileSystemWatcherFactory, that handles the dispose call for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues that address the core abstractions & the wrappersstate: ready to pickIssues that are ready for being worked ontype: bugIssues that describe misbehaving functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions