This documentation is archived and is not being maintained.

PerformanceCounter.Close Method

Closes the performance counter and frees all the resources allocated by this performance counter instance.

[Visual Basic]
Public Sub Close()
[C#]
public void Close();
[C++]
public: void Close();
[JScript]
public function Close();

Remarks

When you associate this PerformanceCounter instance with a performance counter that resides on the server, the system initializes the instance and allocates memory to contain counter sample information. The Close method frees the resources allocated by the object.

Requirements

Platforms: Windows NT Server 4.0, Windows NT Workstation 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

PerformanceCounter Class | PerformanceCounter Members | System.Diagnostics Namespace

Show: