[omniORB] Object_var leak memory

Duncan Grisby duncan at grisby.org
Fri Jul 25 17:25:42 BST 2003


On Friday 25 July, Slava Garelin wrote:

> Why next code losing memory?
> 
>   CORBA::Object_var obj;
>   while(true){
>       obj = new CORBA::Object;
>   }

That code is illegal according to the C++ mapping, so you should have
no expectation about what it might do. What you are seeing is a
side-effect of the way omniORB handles nil object references.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list