2-100
SOMobjects Base Toolkit: Programmer’s Reference Manual
duplicate Method
Purpose
Makes a duplicate of an object reference.
IDL Syntax
SOMDObject duplicate ( );
Description
The duplicate method makes a duplicate of the object reference. The release method
should be called to free the object.
Parameters
receiver A pointer to a SOMDObject object.
env A pointer to the Environment structure for the method caller.
Return Value
The duplicate method returns a SOMDObject that is a duplicate of the receiver. Ownership
of the returned object is transferred to the caller.
Example
#include <somd.h>
Environment ev;
SOMObject obj;
SOMDObject objref1, objref2;
...
objref1 = _create_SOM_ref(SOMD_SOMOAObject, &ev, obj);
objref2 = _duplicate(objref1,&ev);
...
_release(objref2,&ev);
Original Class
SOMDObject
Related Information
Methods: release, create, create_constant, create_SOM_ref
Comentários a estes Manuais