Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IClosable interface

Defines a method to release allocated resources.

.NET:  This interface appears as System.IDisposable.

Syntax


public interface class IClosable

Attributes

[Version(0x06020000)]

Members

The IClosable interface inherits from the IUnknown interface. IClosable also has these types of members:

Methods

The IClosable interface has these methods. It also inherits methods from the Object class.

MethodDescription
Close Releases system resources that are exposed by a Windows Runtime object.

 

Remarks

When building Windows Store apps with the Microsoft .NET Framework, this interface is hidden and developers should use the System.IDisposable interface.

You should implement this interface for Windows Runtime objects that wrap exclusive system resources, such as file handles and network sockets. You do not implement this interface for Windows Runtime objects that wrap shared system resources, such as memory and shareable devices.

Close methods aren't callable through Visual C++ component extensions (C++/CX) on Windows Runtime class instances where the class implemented IClosable. Instead, C++/CX code for runtime classes should call the destructor or set the last reference to null.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows::Foundation

Metadata

Windows.winmd

See also

System.IDisposable

 

 

Show:
© 2014 Microsoft. All rights reserved.