[sqlite] SQLite3 memory leaks in my c++ dll application
>From: Khanh Nguyen>Date: Wed, 20 Apr 2011 11:00:57 -0500 > >SQLite...memory leaks... The VS debugger will stop at the specific allocation number if you add this line early on in your program execution. _crtBreakAlloc = ; Where is the allocation number reported in the Detected Memory Leaks! I use SQLite from VS 2010 C++ 64 bit very heavily in my product. I am not aware of any memory leaks which can be attibuted to SQLite. Also, you should be aware that under the right circumstances it is possible to trick the debug memory allocator into reporting false positives in the leaked memory. Your said that your are using GetProcAddress() to make calls which makes me think you *may* be getting to these false positives. Basically, I believe it comes down to allocating memory in one dll and deallocating in another. Jeff Archer Nanotronics Imaging jsarc...@nanotronicsimaging.com <330>819.4615 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 memory leaks in my c++ dll application
Hello Khanh, Until you confirm the memory leak, I doubt anyone will respond. For example, when my program exits, I abandon a bunch of allocated memory to speed exit. VC says that's a memory leak but, it's not, because it's not leaking memory while I'm using it. I purposely abandon allocated memory on exit to speed exit processing (deallocating 2 gigs of RAM when I'm exiting anyway is pointless). The question is whether it's leaking RAM while you use it, not if it leaks it when you exit (which is when VC checks). C Wednesday, April 20, 2011, 12:00:57 PM, you wrote: KN> Hi SQLite3 community, KN> Please forgive me this panic, incorrect bug report. The cause of memory KN> leaks was from another my software component. The SQLite3.dll is working KN> greatly with my solution. However, it was memory leaks detection from VS2008 KN> when I built the SQLite3 with Sqlite3.c in my solution. KN> If you know about this, please give me some hints on how to set flags in my KN> database module(vcproj) to eliminate the memory leaks. I would greatly KN> appreciate your kindness. KN> The database vcproj DLL built with VS2008 C++ with this flag: Multi-threaded KN> Debug DLL (/MDd). Accessing the DLL via GetProcAddress() calls. KN> Sincerely and Thank you, KN> Khanh KN> On Mon, Apr 18, 2011 at 8:56 AM, Khanh Nguyenwrote: >> Hi, >> >> >> >> My name is Khanh Nguyen and currently using SQLite3.DLL 3.7.6 in my >> application (DLL built with VS2008 C++ with this flag: Multi-threaded Debug >> DLL (/MDd). This DLL is called by other DLL via GetProcAddress to access a >> blob database. The access and blob database is in very good operation. >> However, whenever I exited the application, the VS2008 debugger reported >> this memory leak dectection: >> >> >> >> The DLL has some memory leaks that I have captured here: >> >> >> >> The thread 'Win32 Thread' (0x368) has exited with code 0 (0x0). >> >> Detected memory leaks! >> >> Dumping objects -> >> >> {8390} normal block at 0x01364C70, 64 bytes long. >> >> Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F >> >> {8382} normal block at 0x0138C9C0, 32 bytes long. >> >> Data: <7Zl7ji/F9x+bOgbG> 37 5A 6C 37 6A 69 2F 46 39 78 2B 62 4F 67 62 47 >> >> {8380} normal block at 0x0138B938, 32 bytes long. >> >> Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 69 >> >> {8377} normal block at 0x01391F48, 448 bytes long. >> >> Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD >> >> {7174} normal block at 0x01391DC8, 64 bytes long. >> >> Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F >> >> {7166} normal block at 0x013621D8, 32 bytes long. >> >> Data: <7Zl7ji/F9x+bOgbG> 37 5A 6C 37 6A 69 2F 46 39 78 2B 62 4F 67 62 47 >> >> {7164} normal block at 0x01386690, 32 bytes long. >> >> Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 69 >> >> {7161} normal block at 0x01390430, 448 bytes long. >> >> Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD >> >> {7108} normal block at 0x0138CDC8, 64 bytes long. >> >> Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F >> >> {7100} normal block at 0x01386320, 32 bytes long. >> >> Data: 45 4E 74 35 4B 6B 59 48 52 71 65 55 2F 69 4C 52 >> >> {7098} normal block at 0x0138BCD8, 32 bytes long. >> >> Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 62 >> >> {7095} normal block at 0x0138D530, 448 bytes long. >> >> Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD >> >> {7033} normal block at 0x013796D8, 64 bytes long. >> >> Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F >> >> {7025} normal block at 0x0136DED0, 32 bytes long. >> >> Data: <5U/jyx2txHeUQUe/> 35 55 2F 6A 79 78 32 74 78 48 65 55 51 55 65 2F >> >> {7023} normal block at 0x013658D0, 32 bytes long. >> >> Data: 4E 65 74 77 6F 72 6B 53 65 74 74 69 6E 67 33 2E >> >> {7020} normal block at 0x01389BF0, 448 bytes long. >> >> Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD >> >> Object dump complete. >> >> The program '[5432] DebugConsole.exe: Native' has exited with code 0 (0x0). >> >> >> Please help me resolve this memory leak issue. >> >> Sincerely, >> >> Khanh >> KN> ___ KN> sqlite-users mailing list KN> sqlite-users@sqlite.org KN> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Best regards, Tegmailto:t...@djii.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 memory leaks in my c++ dll application
Hi SQLite3 community, Please forgive me this panic, incorrect bug report. The cause of memory leaks was from another my software component. The SQLite3.dll is working greatly with my solution. However, it was memory leaks detection from VS2008 when I built the SQLite3 with Sqlite3.c in my solution. If you know about this, please give me some hints on how to set flags in my database module(vcproj) to eliminate the memory leaks. I would greatly appreciate your kindness. The database vcproj DLL built with VS2008 C++ with this flag: Multi-threaded Debug DLL (/MDd). Accessing the DLL via GetProcAddress() calls. Sincerely and Thank you, Khanh On Mon, Apr 18, 2011 at 8:56 AM, Khanh Nguyenwrote: > Hi, > > > > My name is Khanh Nguyen and currently using SQLite3.DLL 3.7.6 in my > application (DLL built with VS2008 C++ with this flag: Multi-threaded Debug > DLL (/MDd). This DLL is called by other DLL via GetProcAddress to access a > blob database. The access and blob database is in very good operation. > However, whenever I exited the application, the VS2008 debugger reported > this memory leak dectection: > > > > The DLL has some memory leaks that I have captured here: > > > > The thread 'Win32 Thread' (0x368) has exited with code 0 (0x0). > > Detected memory leaks! > > Dumping objects -> > > {8390} normal block at 0x01364C70, 64 bytes long. > > Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F > > {8382} normal block at 0x0138C9C0, 32 bytes long. > > Data: <7Zl7ji/F9x+bOgbG> 37 5A 6C 37 6A 69 2F 46 39 78 2B 62 4F 67 62 47 > > {8380} normal block at 0x0138B938, 32 bytes long. > > Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 69 > > {8377} normal block at 0x01391F48, 448 bytes long. > > Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD > > {7174} normal block at 0x01391DC8, 64 bytes long. > > Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F > > {7166} normal block at 0x013621D8, 32 bytes long. > > Data: <7Zl7ji/F9x+bOgbG> 37 5A 6C 37 6A 69 2F 46 39 78 2B 62 4F 67 62 47 > > {7164} normal block at 0x01386690, 32 bytes long. > > Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 69 > > {7161} normal block at 0x01390430, 448 bytes long. > > Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD > > {7108} normal block at 0x0138CDC8, 64 bytes long. > > Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F > > {7100} normal block at 0x01386320, 32 bytes long. > > Data: 45 4E 74 35 4B 6B 59 48 52 71 65 55 2F 69 4C 52 > > {7098} normal block at 0x0138BCD8, 32 bytes long. > > Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 62 > > {7095} normal block at 0x0138D530, 448 bytes long. > > Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD > > {7033} normal block at 0x013796D8, 64 bytes long. > > Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F > > {7025} normal block at 0x0136DED0, 32 bytes long. > > Data: <5U/jyx2txHeUQUe/> 35 55 2F 6A 79 78 32 74 78 48 65 55 51 55 65 2F > > {7023} normal block at 0x013658D0, 32 bytes long. > > Data: 4E 65 74 77 6F 72 6B 53 65 74 74 69 6E 67 33 2E > > {7020} normal block at 0x01389BF0, 448 bytes long. > > Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD > > Object dump complete. > > The program '[5432] DebugConsole.exe: Native' has exited with code 0 (0x0). > > > Please help me resolve this memory leak issue. > > Sincerely, > > Khanh > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite3 memory leaks in my c++ dll application
Hi, My name is Khanh Nguyen and currently using SQLite3.DLL 3.7.6 in my application (DLL built with VS2008 C++ with this flag: Multi-threaded Debug DLL (/MDd). This DLL is called by other DLL via GetProcAddress to access a blob database. The access and blob database is in very good operation. However, whenever I exited the application, the VS2008 debugger reported this memory leak dectection: The DLL has some memory leaks that I have captured here: The thread 'Win32 Thread' (0x368) has exited with code 0 (0x0). Detected memory leaks! Dumping objects -> {8390} normal block at 0x01364C70, 64 bytes long. Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F {8382} normal block at 0x0138C9C0, 32 bytes long. Data: <7Zl7ji/F9x+bOgbG> 37 5A 6C 37 6A 69 2F 46 39 78 2B 62 4F 67 62 47 {8380} normal block at 0x0138B938, 32 bytes long. Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 69 {8377} normal block at 0x01391F48, 448 bytes long. Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD {7174} normal block at 0x01391DC8, 64 bytes long. Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F {7166} normal block at 0x013621D8, 32 bytes long. Data: <7Zl7ji/F9x+bOgbG> 37 5A 6C 37 6A 69 2F 46 39 78 2B 62 4F 67 62 47 {7164} normal block at 0x01386690, 32 bytes long. Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 69 {7161} normal block at 0x01390430, 448 bytes long. Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD {7108} normal block at 0x0138CDC8, 64 bytes long. Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F {7100} normal block at 0x01386320, 32 bytes long. Data: 45 4E 74 35 4B 6B 59 48 52 71 65 55 2F 69 4C 52 {7098} normal block at 0x0138BCD8, 32 bytes long. Data: 50 6F 6C 69 63 79 44 61 74 61 50 61 63 6B 2E 62 {7095} normal block at 0x0138D530, 448 bytes long. Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD {7033} normal block at 0x013796D8, 64 bytes long. Data: 63 3A 2F 44 45 56 2F 50 6C 61 74 66 6F 72 6D 2F {7025} normal block at 0x0136DED0, 32 bytes long. Data: <5U/jyx2txHeUQUe/> 35 55 2F 6A 79 78 32 74 78 48 65 55 51 55 65 2F {7023} normal block at 0x013658D0, 32 bytes long. Data: 4E 65 74 77 6F 72 6B 53 65 74 74 69 6E 67 33 2E {7020} normal block at 0x01389BF0, 448 bytes long. Data: <> 10 1F F3 02 00 00 00 00 00 00 00 00 CD CD CD CD Object dump complete. The program '[5432] DebugConsole.exe: Native' has exited with code 0 (0x0). Please help me resolve this memory leak issue. Sincerely, Khanh ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users