Dispose Method
Collapse the table of content
Expand the table of content

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)

'Declaration
Public Sub Dispose

Implements

IDisposable.Dispose

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.

NoteNote:

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft