asp.net.ph

IDisposable Interface

System Namespace


Defines a method to release allocated unmanaged resources.

IDisposable Interface Members

Collapse   Methods

Visibility Name Parameters Return Type
public Dispose ( ) Void

Classes that Implement IDisposable


Class Description
AsymmetricAlgorithm Represents the abstract base class from which all implementations of asymmetric algorithms must inherit.
BinaryReader Reads primitive data types as binary values in a specific encoding.
BinaryWriter Writes primitive types in binary to a stream and supports writing strings in a specific encoding.
Brush Classes derived from this abstract base class define objects used to fill the interiors of graphical shapes such as rectangles, ellipses, pies, polygons, and paths.
CacheDependency Tracks cache dependencies, which can be files, directories, or keys to other objects in your application's Cache. This class cannot be inherited.
Component Provides the base implementation for the IComponent interface and enables object-sharing between applications.
ComponentDesigner Provides a basic designer for components.
Container Encapsulates zero or more components.
Control Defines the properties, methods, and events that are shared by all ASP.NET server controls.
CryptoAPITransform Performs a cryptographic transformation of data.
Cursor Represents the image used to paint the mouse pointer.
CustomLineCap Encapsulates a custom user-defined line cap.
DesignerTransaction Provides a mechanism that can be used to improve performance and enable most types of changes to be undone when performing a series of changes at design-time.
EncoderParameter You can use an EncoderParameter object to pass an array of values to an image encoder. You can also use an EncoderParameter object to receive a list of possible values supported by a particular parameter of a particular image encoder.
EncoderParameters Encapsulates an array of EncoderParameter objects.
EventHandlerList Provides a simple list of delegates. This class cannot be inherited.
Font Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
FontCollection Base class for installed and private font collections. Provides a method to get a list of the font families contained in the collection. For additional information on fonts and text, including example code, see Fonts and Text in the Using GDI+ Managed Classes section of these documents.
FontFamily Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.
FromBase64Transform Converts a CryptoStream from base 64.
Graphics Encapsulates a GDI+ drawing surface. This class cannot be inherited.
GraphicsPath Represents a series of connected lines and curves. This class cannot be inherited.
GraphicsPathIterator Provides the ability to iterate through subpaths in a GraphicsPath object and test the types of shapes contained in each subpath. This class cannot be inherited.
HashAlgorithm Represents the base class from which all implementations of cryptographic hash algorithms must derive.
HttpApplication Defines the methods, properties, and events common to all application objects within an ASP.NET application. This class is the base class for applications defined by the user in the global.asax file.
Icon Represents a Windows icon, which is a small bitmap image used to represent an object. Icons can be thought of as transparent bitmaps, although their size is determined by the system.
Image An abstract base class that provides functionality for Bitmap, Icon and Metafile descended classes.
ImageAttributes Contains information about how image colors are manipulated during rendering. Not inheritable.
InheritanceService Provides a set of methods for identifying inherited components.
IsolatedStorageFile Represents an isolated storage area containing files and directories.
License Provides the abstract ( MustInherit in Visual Basic ) base class for all licenses. A license is granted to a specific instance of a component.
LocalizationExtenderProvider Provides design-time localization support for code generators to enable programs to provide run-time localization features.
ManagementObjectCollection Represents different collections of WMI instances ( namespaces, scopes, and query watcher ).
ManagementObjectCollection.ManagementObjectEnumerator Represents the enumerator on the collection.
MarshalByValueComponent Implements IComponent and provides the base implementation for remotable components that are marshaled by value ( a copy of the serialized object is passed ).
Matrix Encapsulates a 3-by-3 affine matrix that represents a geometric transform. This class cannot be inherited.
MessageEnumerator Provides a forward-only cursor to enumerate through messages in a message queue.
MessageQueueEnumerator Provides a forward-only cursor to enumerate through messages in a message queue.
MessageQueueTransaction Provides a Message Queuing internal transaction.
OleDbDataReader Provides a way of reading a forward-only stream of data rows from a data source. This class cannot be inherited.
OleDbTransaction Represents an SQL transaction to be made at a data source. This class cannot be inherited.
PaintEventArgs Provides data for the Paint event.
Pen Defines an object used to draw lines and curves. This class cannot be inherited.
Region Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inherited.
RegistryKey Represents a key level node in the Windows registry. This class is a registry encapsulation.
ResourceReader Enumerates .resources files and streams, reading sequential resource name and value pairs.
ResourceSet Stores all the resources localized for one particular culture, ignoring all other cultures, including any fallback rules.
ResourceWriter Writes resources in the system-default format to an output file or an output stream.
ResXResourceReader Enumerates XML resource ( .resx ) files and streams, and reads the sequential resource name and value pairs.
ResXResourceWriter Writes resources in an XML resource ( .resx ) file or an output stream.
SearchResultCollection Contains the SearchResult instances that the Active Directory hierarchy returned during a DirectorySearcher query.
ServicedComponent Represents the base class of all classes using COM+ services.
Socket Implements the Berkeley sockets interface.
SqlDataReader Provides a means of reading a forward-only stream of rows from a SQL Server database. This class cannot be inherited.
SqlTransaction Represents a Transact-SQL transaction to be made in a SQL Server database. This class cannot be inherited.
Stream Provides a generic view of a sequence of bytes.
StringFormat Encapsulates text layout information ( such as alignment and line spacing ), display manipulations ( such as ellipsis insertion and national digit substitution ) and OpenType features. This class cannot be inherited.
SymmetricAlgorithm Represents the abstract base class from which all implementations of symmetric algorithms must inherit.
TcpClient Provides client connections for TCP network services.
TempFileCollection Represents a collection of temporary files.
TemplateEditingVerb Represents a designer verb that creates a template editing frame, and can only be invoked by a template editor.
TextReader Represents a reader that can read a sequential series of characters.
TextWriter Represents a writer that can write a sequential series of characters. This class is abstract.
Timer Provides a mechanism for executing methods at specified intervals. This class cannot be inherited.
ToBase64Transform Converts a CryptoStream to base 64.
TraceListener Provides the abstract ( MustInherit in Visual Basic ) base class for the listeners who monitor trace and debug output.
UdpClient Provides User Datagram Protocol ( UDP ) network services.
WaitHandle Encapsulates operating system-specific objects that wait for exclusive access to shared resources.
WebResponse Provides a response from a Uniform Resource Identifier ( URI ). This is an abstract ( MustInherit in Visual Basic ) class.

Remarks

The garbage collector automatically releases the memory allocated to a managed object when that object is no longer used, however, it is unpredictable when garbage collection will occur. Furthermore, the garbage collector has no knowledge of unmanaged resources such as window handles, and open files and streams.

Use the Dispose method of this interface to explicitly release unmanaged resources in conjunction with the garbage collector. The consumer of an object can call this method when the object is no longer needed.

It is a version breaking change to add the IDisposable interface to an existing class, as it changes the semantics of the class.

For a detailed discussion about how this interface and the Object.Finalize method are used, see the Programming for Garbage Collection and Implementing a Dispose Method topics.

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph