![]() |
Overview Duplicates an ORB object. Original class CORBA::ORB
Intended Usage
This method is intended to be used by client and server applications to duplicate a reference to an ORB object. Both the original and the duplicate reference should subsequently be released using CORBA::release(ORB_ptr).
IDL Syntax
static CORBA::ORB_ptr _duplicate (CORBA::ORB_ptr p);
Input parameters
- p
- The ORB object to be duplicated. The reference can be nil, in which case the return value will also be nil.
Return values
- CORBA::ORB_ptr
- The new ORB object reference. This value should subsequently be released using CORBA::release(ORB_ptr).
Example
/* For illustrative purposes, the following program duplicates the orb pointer */ #include "corba.h" int main(int argc, char* argv[]) { int rc = 0; CORBA::ORB_ptr cop = CORBA::ORB_init(argc, argv, "DSOM"); CORBA::ORB_ptr dup_cop = CORBA::ORB::_duplicate(cop); return rc; }