hi, all

i sipxInitialize() and  sipxUnInitialize() sipXtapi in my MFC application, and 
Visual Studio 2005 reports memory leak after my debug version of MFC 
application shutdown.

----------------------------
here is what i did:

1.check out http://scm.sipfoundry.org/rep/sipX/branches/sipXtapi at version 7794

2.open sipXtapi\sipXcallLib\sipXtapi.sln with Visual Studio 2005, batch build 
sipXtapi, and i got "sipXtapi\sipXcallLib\examples\lib\*.lib" and 
"sipXtapi\sipXcallLib\sipXtapi\Debug\sipXtapid.dll"

3.create dialog based MFC application at directory 
"sipXtapi\sipXcallLib\examples\MyTest", add include directory and lib directory 
in my MFC project, copy "sipXtapi\sipXcallLib\sipXtapi\Debug\sipXtapid.dll" to 
"sipXtapi\sipXcallLib\examples\MyTest\Debug\sipXtapid.dll"

4.attachment is my MFC project. It contain all my files in 
"sipXtapi\sipXcallLib\examples\MyTest"

i include
#include "tapi/sipXtapi.h"
#include "tapi/sipXtapiEvents.h"
in MyTestDlg.h

add
SIPX_INST m_aInst[4];
in class CMyTestDlg

initialize instance in OnInitDialog handler
BOOL CMyTestDlg::OnInitDialog()
{
        CDialog::OnInitDialog();

        SIPX_RESULT result0 = sipxInitialize(&m_aInst[0], 5080, 5080, -1, -2);
//      SIPX_RESULT result1 = sipxInitialize(&m_aInst[1], 5081, 5081, -1, -2);
        return TRUE;  // return TRUE  unless you set the focus to a control
}

uninitialize instance in OnClose handler
void CMyTestDlg::OnClose()
{
        // TODO: Add your message handler code here and/or call default

//      SIPX_RESULT result1 = sipxUnInitialize(m_aInst[1]);
        SIPX_RESULT result0 = sipxUnInitialize(m_aInst[0]);
        CDialog::OnClose();
}

5.i run debug version of this MFC application. when the application shutdown, 
VS2005 reports memory leak.
------------------------------

it's terrible that memory leaks even nothing has been done. anybody else run 
into this problem? is this memory leak accumulative?

Attachment: MyTest.rar
Description: Binary data

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

Reply via email to