[omniORB] String sequence and memory leak question

Pletyak Attila attila.pletyak@anemosky.com
Tue, 06 Feb 2001 13:50:04 +0100


In the meantime I debugged further and found that the leak was not
caused in this method but in an other one. 

Attila Pletyak

owner-omniorb-list@uk.research.att.com wrote:
> 
> Hello,
> 
>         I am implementing a system right now based on omniORB 2.8, Debian Linux
> 2.2 and I am quite satisfied with the results.
> 
>         However when I am putting requests to one of my classes implementing a
> CORBA interface I see from the size column of top that the processes
> size continually increases (around 100K by 5000 requests), I narrowed
> the problem to the following:
> 
>         my idl file:
> 
>         typedef sequence<string> StringSeq;
> 
>         interface myClass {
> 
>         // ...
> 
>         StringSeq myFunct( in string sA,
>                            in string sB,
>                            in long lTime,
>                            in string sC );
> 
>         // ...
> 
>         };
> 
>         and in the implementation file:
> 
>         StringSeq* myClassImpl::myFunct( const char* sA, const char* sB,
>                                          CORBA::Long lTime, const char* sC)
>         {
> 
>                 StringSeq_var retSeq = new StringSeq();
>                 return retSeq._retn();
>                 // I deleted the rest of my code for testing only this part.
> 
>         }
> 
>         As far as I know this is the correct solution for returning a sequence.
> 
>         On the client side I store the result of this function in a
> StringSeq_var variable, which takes care of memory management, if I know
> right.
> 
>         Can you please help me what am I doing wrong?
> 
>         Thanks in advance.
> 
>         Attila Pletyak
>         Anemo Ltd.