[omniORB] String sequence and memory leak question

Pletyak Attila attila.pletyak@anemosky.com
Mon, 05 Feb 2001 22:29:51 +0100


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.