Ensure SQLite3's GCHandle is freed when Close is called instead of Dispose.
Also make SQLiteConnection's Dispose call SQlite3's Dispose to ensure we free
the GCHandle in all cases.
{\r
if (bDisposing)\r
Close();\r
-#if MONOTOUCH\r
- if (gch.IsAllocated)\r
- gch.Free ();\r
-#endif\r
}\r
\r
// It isn't necessary to cleanup any functions we've registered. If the connection\r
}\r
\r
_sql = null;\r
+#if MONOTOUCH\r
+ if (gch.IsAllocated)\r
+ gch.Free ();\r
+#endif\r
}\r
\r
internal override void Cancel()\r
{\r
base.Dispose(disposing);\r
\r
+ if (_sql != null)\r
+ _sql.Dispose ();\r
+\r
if (disposing)\r
Close();\r
}\r