다음을 통해 공유


EventCollector.Dispose Method

Disposes of the EventCollector object.

네임스페이스: Microsoft.SqlServer.NotificationServices
어셈블리: Microsoft.SqlServer.NotificationServices (in microsoft.sqlserver.notificationservices.dll)

구문

‘선언
Public Sub Dispose
public void Dispose ()
public:
virtual void Dispose () sealed
public final void Dispose ()
public final function Dispose ()

주의

Calling this method releases all resources allocated for the EventCollector object, and leaves it unusable. Any event data that has been written to the EventCollector since the last Commit call is discarded.

The following examples show how to use the Dispose method to dispose of an EventCollector object.

These examples use the Microsoft.SqlServer.NotificationServices namespace.

Try
    'Add event batch processing code here.
Catch e As System.Exception
    'Add error handling code here.
Finally
    'Dispose of the EventCollector object.
    myEventCollector.Dispose()
End Try
try
{
    //Add event batch processing code here.
}
catch (System.Exception e)
{
    //Add error handling code here.
}
finally
{
    //Dispose of the EventCollector object.
    myEventCollector.Dispose();
}

스레드 보안

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

EventCollector Class
EventCollector Members
Microsoft.SqlServer.NotificationServices Namespace