Without looking at the code, the leak is not caused by the allocation itself - it's caused by not freeing that allocation when you are done with it...! If you allocate some memory you need to ensure it is freed.
Commenting out an allocation will, of course, 'fix' the leak - but I can't imagine your program runs too well afterwards...! ;-) Gavin. N <[EMAIL PROTECTED]> wrote in message news:97902@palm-dev-forum... > > I have almost following kind of code in my application > to capture user's drawing. In emulator I am getting > one memory leak at : > > bitmapP = BmpCreate(drawArea.extent.x, > drawArea.extent.y, depth, clrTableP, errorP); > > If I comment this line no memory leak. > > If I put something like > BmpCreate(100, 60, 8, NULL, errorP); > I get 1 memory leak. > > If I comment no memory leak. > > Anybody saw this problem. Please advise what is > causing this memory leak. > > Thanks > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
