DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2628838 - Last Review: November 18, 2011 - Revision: 2.0

Hotfix Download Available
View and request hotfix downloads
 

On This Page

SYMPTOMS

When you use the FileSystemWatcher class in a Microsoft .NET Framework 4-based application to watch for changes in a specified directory, a memory leak occurs.

CAUSE

This issue occurs because of an error in the FileSystemWatcher class. When a FileSystemWatcher object is created, the FileSystemWatcher class uses the GCHandle class to create a pinned garbage collector (GC) handle. The handle is 8K bytes and uses the byte[] data format. However, the FileSystemWatcher object never frees the garbage collector handle. Therefore, the issue that is described in the "Symptoms" section occurs.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have the .NET Framework 4 installed.

Restart requirement

You have to restart the computer after you apply this hotfix if the affected files are being used.

We recommend that you close all .NET Framework applications that lock or use the affected files before you install this hotfix.

File information

The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

For all supported x86-based versions of the .NET Framework 4 for Windows Server 2003, for Windows XP, for Windows Vista, for Windows Server 2008, for Windows Server 2008 R2, or for Windows 7
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.dll4.0.30319.5133,511,11210-Oct-201102:35x86
For all supported x64-based versions of the .NET Framework 4 for Windows Server 2003, for Windows XP, for Windows Vista, for Windows Server 2008, for Windows 7, or for Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.dll4.0.30319.5133,511,11210-Oct-201102:35x64
For all supported IA-64–based versions of the .NET Framework 4 for Windows Server 2003, for Windows Server 2008, or for Windows Server 2008 R2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
System.dll4.0.30319.5133,511,11210-Oct-201102:35IA-64

MORE INFORMATION

For more information about the FileSystemWatcher class, visit the following MSDN website:
General information about the FileSystemWatcher class (http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx)
For more information about the GCHandle structure, visit the following MSDN website:
General information about the GCHandle structure (http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.gchandle.aspx)

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft .NET Framework 4
Keywords: 
kbqfe kbhotfixserver kbfix kbexpertiseadvanced kbsurveynew KB2628838
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support