Intended Usage
This method can be used to destroy (delete) a local object residing in a server. All outstanding references to the object are henceforth invalid. Outstanding remote references (proxies) to the object are valid only if the server is capable of reactivating to the object. The current implementation of this method simply deletes the input object.
This method is part of the CORBA specification.
Syntax
virtual void dispose(CORBA::Object_ptr obj);
Parameters
Example
#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* Assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); extern static CORBA::ORB_ptr op; /* assume previously initialized */ extern static CORBA::BOA_ptr bp; /* assume previously initialized */ bp->impl_is_ready(imp); ... /* Assume that p is a local object pointer already declared and defined */ bp->dispose(p); ... }
#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* Assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); static CORBA::ORB_ptr op = CORBA::ORB_init(argc, argv, "DSOM"); static CORBA::BOA_ptr bp = op->BOA_init(argc, argv, "DSOM_BOA"); bp->impl_is_ready(imp); ... /* Assume that p is a local object pointer already declared and defined */ bp->dispose(p); ... }