Hibernate version: 2.0.1.4000
Code:
using (ISession sess = factory.OpenSession())
{
string sql = "update mytable set count = 0 where id=0";
ISQLQuery qry = sess.CreateSQLQuery(sql);
qry.ExecuteUpdate();
qry = null;
}
Hi,
every time i run the code above in a Windows Forms Application (.Net 2)
the GC will not collect these (recorded with YourKit Profiler):
Type Count Size in Bytes
Code:
System.String 48 940
System.Collections.Generic.Dictionary/KeyCollection<System.String,System.Object> 2 24
System.Collections.Generic.Dictionary<System.String,System.Object> 2 104
Iesi.Collections.Generic.HashedSet<System.String> 2 24
NHibernate.Engine.Query.Sql.NativeSQLQuerySpecification 1 24
NHibernate.SqlCommand.SqlString 1 16
NHibernate.Util.SequencedHashMap/Entry 1 24
NHibernate.Engine.Query.Sql.INativeSQLQueryReturn[] 1 16
NHibernate.Engine.Query.NativeSQLQueryPlan 1 16
NHibernate.Loader.Custom.Sql.SQLCustomQuery 1 24
System.Collections.Hashtable/bucket[] 1 144
System.Collections.ArrayList 1 24
System.Collections.Hashtable 1 56
For example, in the first line, you see that, every time, there are 48 strings with a total size of 940 bytes not garbage collected.
And other types are also not freed.
Could you confirm this error?