asp.net - NHibernate holding on to a reference to data objects -


i'm trying work out lot of memory in app going , while doing profiling i'm noticing data objects loaded nhibernate hanging around once request (is asp.net), , therefore session, has ended. tracing back, there various things seem doing it, "singletableentitypersister" , "statefulpersistencecontext". i've disabled 2nd level caching now, they're still being held on to

any ideas?

the session being correctly disposed:

        if (session != null)         {             if (session.transaction != null && session.transaction.isactive)             {                 session.transaction.rollback();             }             else             {                 session.flush();             }              session.close();             session.dispose();         } 

nhibernate tracks changes made objects, means if do:

user.firstname = "name" 

it make appropriate update in db.

but track nh needs references objects. not tracked entities can either use istatelesssession or remove object session using evict method.

when session disposed releases tracked entities. check if session deleted , transaction closed


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -