Nhibernate does not free memory after session close

I am using NHibernate 2.2 with C # 3.5 and VS2008,

The problem is that I close the Nhibernate session object, the memory is not freed. even I call GC.Collect () after every close, but nothing gets freed

How to get NHibernate to free objects loaded into a session when the session is closed?

thank

+5
source share
2 answers

Use Dispose instead of closing. (Not only for the session, but for each object that implements IDisposable in .net)

+1
source

, , GC.Collect();. , , , , , .

, , NHibernate .

0

All Articles