[Enterprise Extensions only]

IRObject::destroy

Overview The destroy operation causes the object to cease to exist within the Interface Repository database.
Original interface IRObject Interface
Exceptions CORBA::SystemException


Intended Usage

The destroy operation causes the object to cease to exist. If the object is a Container, destroy is applied to all of its contents. If the object contains an IDLType attribute for an anonymous type, that IDLType is destroyed. If the object is currently contained in some other object, it is removed from that container object. Invoking destroy on a Repository object or on a PrimitiveDef is an error.

The destroy operation causes the object to cease to exist. If the object is a Container, destroy is applied to all of its contents. If the object contains an IDLType attribute for an anonymous type, that IDLType is destroyed. If the object is currently contained in some other object, it is removed from that container object. Invoking destroy on a Repository object or on a PrimitiveDef is an error. CORBA 2.1 requires that the IR not be left in an incoherent state. After a destroy there cannot be any dangling references. The IBM implementation of destroy ensures this by deleting all objects that refer to the destroy target. When destroying an interface this will include all of its children. Use caution.

IDL Syntax

  void destroy ();

Input parameters

None.

Return values

Void
No value is returned.

Example

  // C++
     // assume that 'this_module' has already been initialized
     CORBA::ModuleDef * this_module;
 
     // destroy the module and all that it contains
     this_module-> destroy ();