- A consequence of location transparency
- Client and server code is unchanged if objects are local or remote
- Consider an object implementation returning a string
- In the colocated case
- the pointer (
char*) is simply returned to the caller
- In the remote case
- The ORB must write the data to the network
- then free the returned string
- The receiving orb must read the data and allocate a new string
- Making both cases transparent implies:
- The callee must return a string copy (a give)
- The caller is responsible for freeing the returned string
- Both must use the same new/delete methods
- In the case of the IDL string type:
char* CORBA::string_alloc()
CORBA::string_free( char* )
|