[omniORB] Object_var leak memory

Slava Garelin garelin at ukr.net
Mon Jul 28 18:26:30 BST 2003


On Fri, 25 Jul 2003 16:25:42 +0100
Duncan Grisby <duncan at grisby.org> wrote:

> 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.
> 

You quite right!

obj = CORBA::Object::_nil(); must using in that case...

-- 
Slava Garelin



More information about the omniORB-list mailing list