Ticket Hash: | 5078e323ed4a7c9ccf0dae2e3e3e87e9df6bf933 | |||
Title: | SQLiteStatement is not being disposed properly (could lead to memory leak) | |||
Status: | Closed | Type: | Incident | |
Severity: | Important | Priority: | Medium | |
Subsystem: | Data_Reader | Resolution: | Need_More_Info | |
Last Modified: | 2014-11-25 01:27:56 | |||
Version Found In: | 1.0.94.0 | |||
User Comments: | ||||
anonymous added on 2014-11-06 22:44:09:
SQLiteStatement is an IDisposable class. In one particular method it is being created but not disposed. This could lead to potential memory leak. Call stack of allocation is: System.Data.SQLite!System.Data.SQLite.SQLite3.Prepare( SQLiteConnection,string,SQLiteStatement,uint,ref string ) System.Data.SQLite!System.Data.SQLite.SQLiteCommand.BuildNextCommand() System.Data.SQLite!System.Data.SQLite.SQLiteCommand.GetStatement( int ) System.Data.SQLite!System.Data.SQLite.SQLiteDataReader.NextResult() System.Data.SQLite!System.Data.SQLite.SQLiteDataReader..ctor( SQLiteCommand,CommandBehavior ) Here is NextResult method, the statement is created, but never disposed afterwards. mistachkin added on 2014-11-07 21:49:54: First, this does not appear to be an actual leak. The NextResult method does not create the SQLiteStatement objects (i.e. they are held by the SQLiteCommand object). Second, the SQLiteStatement is basically a wrapper for a SQLiteStatementHandle and the test suite (in the debug build) always counts the number of outstanding instances of that class (i.e. which should be zero when cleanup is complete). Given these facts, it seems highly unlikely there is a leak here; however, if you can demonstrate a leak with C#, I'll be happy to look into it further. mistachkin added on 2014-11-19 00:04:04: Without further information, this ticket will be closed on November 21st, 2014. |