Re: memory leak with lineGetID

camera wrote:

How is a question about TAPI relevant in a group focused on
WMM? Use <news:microsoft.public.win32.programmer.tapi>.

> I have a program which is reporting a memory leak here
> but I have not determined why. Does it looks fine?? It
> works.

A memory leak does not prevent a program from running and it
is not a problem once the process terminates but, as long as
the program runs, it will progressively consume memory.

> pVarString =
> LEAK IS HERE => if (lRet = lineGetID(0, 0, hCall,
> LINECALLSELECT_CALL, pVarString, TEXT("wave/in")))

You didn't properly initialize

pVarString->dwTotalSize = BIGBUFF;

May that's what causes lineGetID() to leak memory.

You should read the documentation about lineGetID():

Prior to calling lineGetID, the application should set the
dwTotalSize member of this structure to indicate the amount
of memory available to TAPI for returning information.


// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


Relevant Pages

  • Enabling memory leak detection in VC++
    ... The visual studio debugger along with C run-time libraries provides us means for detecting memory leaks.But its capabilities are minimal. ... By default, _CrtDumpMemoryLeaks dumps memory leak information to the Output window,we can reset this to a file using _CrtSetReportMode. ... Why does MFC call _CrtDumpMemoryLeaks ?!? ... CRT will happily report all left-over memory via ...
  • [NT] Services for UNIX 2.0 Suffer from a Remotely Triggered Memory Leak
    ... Services for UNIX 2.0 Suffer from a Remotely Triggered Memory Leak ... 2000 are not affected by the vulnerability. ... * A vulnerability that could enable an attacker to cause the NFS service ...
  • RE: Memory increasing even when in debug-break
    ... there are 2 types of memory leak in .Net: ... More interesting is the debugger breaks while memory still increasing ... Microsoft Online Community Support ...
  • RE: Weird memory leak when I am playing movie on WinCE6
    ... "tiannho" wrote: ... Now I am suspecting whether there is a real memory leak. ... allocations and deallocations and match them up. ...
  • Re: Memory leak in the Driver
    ... will it also work for device driver ??? ... if the following application is used then, there is no memory leak. ...