Memory leaks

Mark.Whalley@NS.PNG.LE.gpt.co.uk Mark.Whalley@NS.PNG.LE.gpt.co.uk
Thu, 24 Jul 1997 11:27:25 -0300 (BST)


The following code fragment appears to leak memory

    ...

    CORBA::Object_var obj;

    for (int i=0; i<9999; i++)
    {
	obj = rootContext->resolve(name);
    }

    ...


I'm assuming that the object reference is not being released when the
Object_var is assigned a new (in this case the same) object reference. The C++
language mappings state "the object reference variable type (A_var) will
automatically release its object reference when it is deallocated or when
assigned a new object reference".

I'm running this on Solaris, an monitoring the memory usage using ps -l.

Is this a known problem or am I doing something daft.