RMCLink.Interop .NET Assembly

RMCLink.Dispose Method

Releases the unmanaged resources used by the RMCLink object. This includes the internal RMCLink COM component and any in-use TCP/IP connections or serial ports.

Syntax

Visual Basic (Declaration)

Public Sub Dispose

 

Visual Basic (Usage)

Dim instance As RMCLink

 

instance.Dispose()

 

C#

public void Dispose ()

 

Visual C++/CLI

public:

void Dispose ()

Implements

IDisposable.Dispose

Remarks

Calling Dispose allows the resources managed by the RMCLink object to be released. This will release the reference to the RMCLink COM component and if the link was connected, Disconnect will be called internally.

This function is not typically needed in applications, unless you want to force the release of the RMCLink COM component. However, the user typically does not care when the RMCLink COM component itself is released. The only release issue that the user cares about is when the serial port or TCP/IP connection is released, and this can be done by the Disconnect method. Calling Disconnect from inside the finally branch of a try-finally block can ensure that these resources are freed up even when exceptions are thrown.

Exceptions

No exceptions are generated by this method.

See Also

RMCLink.Interop .NET Assembly | RMCLinkNET Namespace | RMCLink Class


Send comments on this topic.

Copyright (c) 2024 Delta Computer Systems, Inc. dba Delta Motion