< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Strange heap corruption message


Hi,
 
I am experiencing some strange heap corruption message cause be the following line executed from the destructor of ares:

free(channel->lookups);

(ErrorMsg is: HEAP[svchost.exe]: Invalid Address specified to RtlValidateHeap( e80000, e92bf8 ))
 
I am not sure if this is the true reason for the error, maybe if has rather to do something how I create and destroy the stack.
 
Creation:
 
 mStack = new resip::SipStack();
 mDum = new resip::DialogUsageManager(*mStack);
 mStackThread = new resip::StackThread(*mStack);
 mDumThread = new resip::DumThread(*mDum);
 
Destruction:
 
  if (mStackThread)
  {
   mStackThread->shutdown();
  }

  if (mDumThread)
  {
   mDumThread->shutdown();
  }

  if (mStackThread)
  {
   mStackThread->join();
   delete mStackThread;
   mStackThread = NULL;
  }

  if (mDumThread)
  {
   mDumThread->join();
   delete mDumThread;
   mDumThread = NULL;
  }

  if (mDum)
  {
   delete mDum;
   mDum = NULL;
  }
 
  if (mStack)
  {
   delete mStack;
   mStack = NULL;
  }

Do you see any problems with this code or should I look elswhere for the problem with the heap corruption..?
 

Thanks and best regards,

Matthias Moetje

TERASENS GmbH
Augustenstraße 24
80333 Munich
GERMANY
 
Phone:
Fax:
e-mail:
Web:
+49.89.143370-0
+49.89.143370-22
info@xxxxxxxxxxxx
www.terasens.com