Re: [sqlite] SQLite leaks memory
Hi, Clemens, On Sun, Nov 4, 2012 at 3:11 AM, Clemens Ladisch wrote: > Igor Korot wrote: >> When the user asks to edit the data it starts the transaction, then >> set the "SAVEPOINT" > > Why do you need a savepoint in addition to the transaction? Because it is a transaction inside transaction for the scenario #3. > >> Now the problem: only during the scenario #3 I have a lot of memory >> leaks. They are reported in the Visual Studio debug >> window. Looking at the data I did a global search and it turns out >> that those leakage are coming from the sqlite. > > How are those leaks shown? With a call stack? In that case, please > don't keep it a secret. > > It would be helpful to show the code for scenario #3. > (It might be possible that your code doesn't correctly free some > SQLite object.) Well I spent a good 30 minutes+ going thru vld report (all those 'false positives') (I reported them to vld actually). At the very end of it there was a callstack that gave a leak. Which is now fixed. Nevertheless, it would be nice to know what people use to identify leaks... Thank you. > > > Regards, > Clemens > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite leaks memory
Igor Korot wrote: > When the user asks to edit the data it starts the transaction, then > set the "SAVEPOINT" Why do you need a savepoint in addition to the transaction? > Now the problem: only during the scenario #3 I have a lot of memory > leaks. They are reported in the Visual Studio debug > window. Looking at the data I did a global search and it turns out > that those leakage are coming from the sqlite. How are those leaks shown? With a call stack? In that case, please don't keep it a secret. It would be helpful to show the code for scenario #3. (It might be possible that your code doesn't correctly free some SQLite object.) Regards, Clemens ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite leaks memory
Hi, ALL, I have a very interesting situation. I'm trying to compile my project using Visual Studio 2010. It is a C++ executable and I just inserted the source code from the amalgamation archive into the project. I also changed the settings for the sqlite3.c to be recognized as a "C" source code and set a warning level to be /W3. Now I have a class that is communicates with the database file. In this class I have 3 routine: one for adding records, one for deleting records and one for updating records.Since there are multiple records all 3 functions utilize transactions. The first function is very simple: I grab the data and drop them in the db. No problem at all. The second one is also simple: check if the user wants to delete and if yes deletes records. The third one is actually a little complicated. It utilizes the capabilities of the first 2 functions. When the user asks to edit the data it starts the transaction, then set the "SAVEPOINT" deletes the appropriate records and then insert the changed data. Now the problem: only during the scenario #3 I have a lot of memory leaks. They are reported in the Visual Studio debug window. Looking at the data I did a global search and it turns out that those leakage are coming from the sqlite. Is there a way to isolate those leakage? I don't think I found a bug in the SQLite engine but I don't see a good data from my program in the leakage report of Visual Studio neither. Any suggestions? Since the program is GUI-based I can't use _CtrDbg-like functions. I tried to use VLD but it reported leaks in legitimate sqlite functions. Any help would be appreciated. Thank you. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users