NetworkInterfaceList.Dispose Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Releases the resources used by the current instance of the NetworkInterfaceList class.

Namespace:  Microsoft.Phone.Net.NetworkInformation
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

Syntax

Public Sub Dispose
public void Dispose()

Implements

IDisposable..::.Dispose()()()

Remarks

Called by user code. This method frees native resources and suppresses finalization by the garbage collector.Call Dispose when you are finished using the NetworkInterfaceList. After calling Dispose, you must release all references to the NetworkInterfaceList so the garbage collector can reclaim the memory that the NetworkInterfaceList was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

Note

Always call Dispose before you release your last reference to the NetworkInterfaceList. Otherwise, the resources it is using will not be freed until the garbage collector calls the NetworkInterfaceList object's System.Object.Finalize method.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

NetworkInterfaceList Class

Microsoft.Phone.Net.NetworkInformation Namespace