vxi-discuss



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with OpenVXI



Hello,
I tryed to write a small Windows application with OpenVXI support.
Now I run in troubble with memory leaks...

In the OnInitDlg() function I init the JSI and OS:

 m_gp = new(global_t);
 VXIObject args = VXIObjectCreate();
 ParseINI(args);		//to fill my args structure
 m_gp->numChannels =
VXIIntegerValue(VXIObjectGetProperty(args,"MaxChannels"));
 m_gp->url = VXIStringValue(VXIObjectGetProperty(args,"StartURL"));

 JSIHandle runtime;
 VXIresult error;
 error = VXIjsiInit(&runtime);
 if(error)
   exit(1);
 m_gp->runtime = runtime;
 error = VXIosInit(args);
 if (error)
   exit(1);
 m_gp->osi = NULL;
 m_gp->args = args; 


And in the OnDestroyWindow() function I try to clean up...

 VXIresult error;
 VXIObject args;
 args = m_gp->args;
 VXIObjectDestroy(args);
 
 JSIHandle runtime;
 runtime = m_gp->runtime;
 error = VXIjsiShutDown(runtime);
 error = VXIosShutDown();
 delete m_gp;			//created with new

My Debugger tells me about two memory leaks:
First is 16bytes (I think from VXIos), second is 160 bytes (from VXIjsi).
The error will not occure, when I comment the VXIjsi...() and VXIos..().

Can anybody help me finding the error? I searched the OS_URL_win.cpp and
jsi_sm.c, 
but i do not find any hints...

Jürgen




This page is maintained by Alan W Black (awb@cs.cmu.edu)
speechinfo.org is hosted on a machine donated by VA Linux Systems
VA Linux Systems