in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Memory leak in SQLiteDataAdapter?

Last post 09-16-2010 1:36 AM by GertG. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-16-2010 1:36 AM

    • GertG
    • Not Ranked
    • Joined on 09-16-2010
    • Posts 1

    Memory leak in SQLiteDataAdapter?

     I had a problem with memory leaking when using SQLiteDataAdapter.

    To reproduce, run code like this in a loop and watch the program's memory grow:

    Dim sql As String = "Select * from TableName limit 1"
    Using targetTable As New DataTable
        Using adapter As New SQLiteDataAdapter(sql, connection)
            adapter.Fill(targetTable)
        End Using
    End Using

    (connection is an open SqliteConnection that's also inside a using construct)

    I avoided the leak by using a DataReader instead of a DataAdapter, but I'd still like to know if this is an actual bug or if I was doing something wrong.

     

     

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems