[omniORB] Exception member - managed types

Dietmar May dcmay@object-workshops.com
Wed, 23 Aug 2000 17:07:22 -0400


I have three related questions regarding portable behavior for CORBA, =
and its implementation in omniORB.

---

CORBA 2.3 indicates that a struct member of type "object reference" has =
the same behavior as a _ptr type, except for copy constructor - which =
copies - and assignment operator -  which releases - the member's =
storage.=20

Question 1:
It seems that the assignment operator takes ownership of the storage, =
but the copy constructor does not?

---

If I have an exception, XcpUser, the default constructor is to perform =
no explicit member initialization.=20

Question 2:
Does a member helper initialize an object reference member to nil? Or is =
this undefined behavior? (Can't find any immediate reference to this in =
the book).

---

Given:

interface Something;
exception XcpUser
{
   Something it;
};


Something like the following is generated:

class XcpUser : public CORBA::UserException
{
public:
   Something_Helper it;
};
XcpUser::XcpUser(Something_ptr _it)
{
  it =3D Something::_duplicate(_it);
}
XcpUser::XcpUser()
{
}

Question 3:
Is "it" implicitly and portably initialized to _nil?

Thanks,
Dietmar