[omniORB] TypeCode_var equivalent memory leak
Michael Shearer
mshearer at aastra.com
Tue Apr 13 12:05:40 BST 2004
Hi!
I'm having problems figuring out why the following bit of code leaks. For some reason, the TypeCode equivalent primitive seems to be allocating memory, is this correct behaviour? Am I doing something wrong?
I would appreciate any help!
Thanks,
Mike
CORBA::Any* EventMgr_impl::pull( const CORBA::Any& Event, Event::queueName_t SourceQ )
{
METHODTRACE( "CORBA::Any* EventMgr_impl::pull( const CORBA::Any& Event, Event::queueName_t SourceQ )" );
CORBA::Any event;
if( (SourceQ < Event::MAX_EVENT_QUEUE) &&
(SourceQ != Event::NULLQ) )
{
if( (!eventQueuesM[SourceQ].queue.empty()) &&
(eventQueuesM[SourceQ].queue.back().type()->equivalent(Event.type())) ) <<<<===== This is where it leaks
{
eventQueuesM[SourceQ].notified = FALSE;
event = eventQueuesM[SourceQ].queue.back();
eventQueuesM[SourceQ].queue.pop_back();
return new CORBA::Any(event);
}
else
return NULL;
}
else
{
LogError("Received pull for unknown queue.");
throw Event::EventProxy::invalidQ();
}
}
Michael Shearer
CVX SS7 Gateway (CSG) Engineer
Aastra Telecom US, CVX Division
8 Federal Street
Billerica, MA, USA, 01821-3570
* Phone (978) 436-4248
* Fax (978) 436-4233
* Internet Mail mshearer at aastra.com
* Web www.aastra.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040413/2c9886b7/attachment.htm
More information about the omniORB-list
mailing list