[omniORB] Object_var leak memory

Slava Garelin garelin at ukr.net
Fri Jul 25 19:16:37 BST 2003


Hi all!

Why next code losing memory?

  CORBA::Object_var obj;
  while(true){
      obj = new CORBA::Object;
  }

I think trouble in include/omniORB4/CORBA_Object.h:

_CORBA_MODULE_FN inline void release(Object_ptr o) {
 if( o && !o->_NP_is_nil() ) {
    if( o->_NP_is_pseudo() ) 
       o->_NP_decrRefCoun t();
    else 
       omni::releaseObjRef(o->_PR_getobj());  
 } 
}

-- 
Slava Garelin



More information about the omniORB-list mailing list