The "Detach" is not called in the Dispose of connection
-------------------------------------------------------
Key: DNET-487
URL: http://tracker.firebirdsql.org/browse/DNET-487
Project: .NET Data provider
Issue Type: Bug
Components: ADO.NET Provider
Affects Versions: 3.0.2.0
Environment: .NET 4.0
Firebird Classic v1.5
Reporter: Hélio Tibagí de Oliveira
Assignee: Jiri Cincura
The method "isc_detach_database" is not being called in dispose of connections.
This makes the process of Firebird (classic mode) is loaded into memory and is
only released when the application terminates. Unfortunately we use the old
Firebird 1.5, but probably this problem should occur in all versions.
Below is a snippet of code to bypass this problem:
using (var conn = new
FbConnection("User=SYSDBA;Password=masterkey;Database=myserver:mydatabase.fdb;Dialect=3;Charset=WIN1252;"))
{
conn.Open();
DataTable dt = new DataTable();
new FbDataAdapter("SELECT FIRST 400 * FROM TABLE",
conn).Fill(dt);
//Hack by reflection to FIX the close/dispose issue
var fbConnectionInternal =
typeof(FbConnection).GetField("innerConnection", BindingFlags.NonPublic |
BindingFlags.Instance);
var innerConnection = fbConnectionInternal.GetValue(conn);
var iDatabase = innerConnection.GetType().GetField("db",
BindingFlags.NonPublic | BindingFlags.Instance);
var db = iDatabase.GetValue(innerConnection);
var detachMethod = db.GetType().GetMethod("Detach");
detachMethod.Invoke(db, null);
conn.Close();
}
Please can you fix this problem? Many problems are occurring in our servers
because of this. Thanks in advance.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider