I have a class which wraps an instance of SQLiteConnection, should I need to implement the dispose method to call the SQLiteConnection one?
Nope. Just wrap your SQLiteConnection instantiation in a
using (connection = new SQLiteConnection())
// use `connection` here
} // `connection` is disposed here.
connection object is automatically disposed when the
using block goes out of scope (at the ending brace of the
If you are inheriting from
SQLiteConnection, then inherit also from
IDisposable and implement the
Dispose() method, which will do any local cleanup that's needed in your descendant class and then call
Dispose() on the parent
Using Statement (C# Reference)