nemequ / sqlheavy

Automatically exported from code.google.com/p/sqlheavy
Other
5 stars 4 forks source link

Query leaks a Sqlite.Statement when it is finalized without having been executed #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Statements are compiled by the Query object, and finalized by the QueryResult 
object. So if a query is not executed, its statement is never finalized.

There is a testcase in this message [1] on the vala mailing list.

I wrote a patch that confirms that this is the problem [2]. With this patch 
applied, the memory leak disappears. However, I haven't tested it in other 
scenarios so it may introduce problems of its own.

This is with sqlheavy 0.2 master on Ubuntu 12.04LTS.

[1] http://www.mail-archive.com/vala-list@gnome.org/msg08608.html
[2] 
https://gitorious.org/~tkluck/sqlheavy/tklucks-sqlheavy/commit/c91da3ff5fe5a819d
0349bdab155b1d7a1f1cf54

Original issue reported on code.google.com by tkl...@gmail.com on 24 Jun 2012 at 11:28

GoogleCodeExporter commented 9 years ago
Awesome, thanks!  Fixed in git.

Original comment by nem...@gmail.com on 27 Jun 2012 at 5:11