Re: memory leak with lineGetID
- From: "Alessandro Angeli [MVP::DigitalMedia]" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 23:17:07 +0200
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.
> LPVARSTRING pVarString = NULL;
> pVarString =
> (LPVARSTRING)LocalAlloc(LPTR, BIGBUFF);
>
> 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
.
- Follow-Ups:
- Re: memory leak with lineGetID
- From: camera
- Re: memory leak with lineGetID
- References:
- memory leak with lineGetID
- From: camera
- memory leak with lineGetID
- Prev by Date: memory leak with lineGetID
- Next by Date: Re: memory leak with lineGetID
- Previous by thread: memory leak with lineGetID
- Next by thread: Re: memory leak with lineGetID
- Index(es):
Relevant Pages
|