Whenever I run this simple code with parameter false or true, I get lots 
of memory leaks shown by visual studio even in the newest code from 
sipxtapi branch.

      SIPX_INST pSipXInstance;
      SIPX_RESULT result = sipxInitialize(&pSipXInstance);
      result = sipxUnInitialize(pSipXInstance, false);

When I use visual leak detector it shows me exactly where the leaked 
memory was allocated:

    
c:\work\sipfoundry\branches\sipxtapi\sipxportlib\src\os\osprotecteventmgr.cpp 
(77): OsProtectEventMgr::OsProtectEventMgr
    
c:\work\sipfoundry\branches\sipxtapi\sipxportlib\src\os\osprotecteventmgr.cpp 
(40): OsProtectEventMgr::getEventMgr
    
c:\work\sipfoundry\branches\sipxtapi\sipxcalllib\src\cp\callmanager.cpp 
(1228): CallManager::getCalls
    
c:\work\sipfoundry\branches\sipxtapi\sipxcalllib\src\tapi\sipxtapiinternal.cpp 
(1638): sipxGetActiveCallIds
    
c:\work\sipfoundry\branches\sipxtapi\sipxcalllib\src\tapi\sipxtapi.cpp 
(669): sipxUnInitialize

In that file on line 77 there is line "pEvent = new 
OsProtectedEvent(userData);" but this isn't dealocated anywhere. This 
leak repeats itself several times. Another leak is in

    
c:\work\sipfoundry\branches\sipxtapi\sipxtacklib\src\net\sipmessage.cpp 
(5328): SipMessage::SipMessageFieldProps::initDisallowedUrlHeaders
    
c:\work\sipfoundry\branches\sipxtapi\sipxtacklib\src\net\sipmessage.cpp 
(5275): SipMessage::SipMessageFieldProps::SipMessageFieldProps
    
c:\work\sipfoundry\branches\sipxtapi\sipxtacklib\src\net\sipmessage.cpp 
(81): SipMessage::SipMessage
    
c:\work\sipfoundry\branches\sipxtapi\sipxtacklib\src\net\sipclient.cpp 
(212): SipClient::run
    
c:\work\sipfoundry\branches\sipxtapi\sipxportlib\src\os\wnt\ostaskwnt.cpp 
(587): OsTaskWnt::threadEntry
    0x7C80B683 (File and line number not available): GetModuleFileNameA

on line    mDisallowedUrlHeaders.insert(new UtlString(SIP_VIA_FIELD));


Jaro

_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to