diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-03-23 00:03:14 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-03-23 00:03:14 +0000 |
commit | 1ab8190966a253fcf57273e118cedbc50854587a (patch) | |
tree | b9f923b98e1afadea5e76c15c7fbe6dedcf103d4 /TAO/tao/Object.cpp | |
parent | a27af132cf6e13e737c1ed1f720dd2c921038a76 (diff) | |
download | ATCD-1ab8190966a253fcf57273e118cedbc50854587a.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/tao/Object.cpp')
-rw-r--r-- | TAO/tao/Object.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp index 331f2237697..1fe41e67f58 100644 --- a/TAO/tao/Object.cpp +++ b/TAO/tao/Object.cpp @@ -30,6 +30,39 @@ CORBA_Object::~CORBA_Object (void) this->parent_->Release (); } +CORBA_Object_var::~CORBA_Object_var (void) // destructor +{ + CORBA::release (this->ptr_); +} + +CORBA_Object_var::CORBA_Object_var (void) // default constructor + : ptr_ (CORBA_Object::_nil ()) +{ +} + +CORBA_Object::CORBA_Object (STUB_Object *protocol_proxy, + TAO_ServantBase *servant, + CORBA_Boolean collocated) + : servant_ (servant), + is_collocated_ (collocated), + parent_ (0), + refcount_ (1) +{ + // Notice that the refcount_ above is initialized to 1 because + // the semantics of CORBA Objects are such that obtaining one + // implicitly takes a reference. + this->_set_parent (protocol_proxy); +} + +// CORBA dup/release build on top of COM's (why not). + +void +CORBA::release (CORBA_Object_ptr obj) +{ + if (obj) + obj->Release (); +} + CORBA::InterfaceDef_ptr CORBA_Object::_get_interface (CORBA::Environment &env) { |