Hi,

Sherief, thank you for our kind help.
I really did use globals.
I found a way to run DumpMemorLeaks after all globals and static
variables are deallocated, I used
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);

I made some malloc and new leaks around the code I'm interested in to
see if it works - worked great, but I found
NO leaks in sqlite sqlite3_prepare.

I'm not sure if it means that there is an error in Deleaker or
CrtDumpMemoryLeaks doesn't report mallocs from DLL ( i bet on Deleaker
because it claims that there is a leak in heap so CrtDumpMemoryLeaks
should show this  ).

How do you think?

Bartek

On Wed, Nov 5, 2008 at 5:58 PM, Sherief N. Farouk <[EMAIL PROTECTED]> wrote:
>> I really don't see any way to use  _CrtDumpMemoryLeaks(). It always
>> shows hundreds of blocks even if I'm sure that nothing was allocated
>> (no malloc or new). I know that this is not a place to learn how to
>> use VC++. Maybe it's true that Deleaker just freaks out. I will try to
>> track it down another way. All ideas appreciated.
>>
>> Bartek
>
> TFM should be helpful. Do something like:
>
> Int main()
> {
>        //Note the extra scope..
>        {
>                //...app work goes here
>        }
>        _CrtDumpMemoryLeaks(); //I hope you're not using globals, if so
> deallocate them before this call.
>        Return 0;
> }
>
> Watch the output window, and if leaks are detected (and your app's
> allocation behavior is pretty deterministic), _CrtSetBreakAlloc() is you
> best friend.
>
> - Sherief
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to