NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IContainer.Dispose

Disposes of the IContainer.

[Visual Basic]
Sub Dispose()
[C#]
void Dispose();
[C++]
void Dispose() = 0;
[JScript]
function Dispose();

Return Value

None.

Remarks

The implementation of Dispose must:

  1. Remove the components contained in the container, by using the Remove method.
  2. Remove any references to other containers. Typically, this can be accomplished by assigning a null reference object to any field that contains references to other containers.
  3. Release any system resources that are associated with the component, such as file handles, window handles, or database connections.
  4. Dispose of any child containers, such as child windows or submenu items, by calling the Dispose method of those components.

Ideally, a call to Dispose will cause the container to revert to its initial state, as it was immediately after it was created. However, this is not a requirement. Following a call to the Dispose method, a container is permitted to raise exceptions for operations that it cannot meaningfully perform.

See Also

IContainer Interface | IContainer Members | System.ComponentModel Namespace