-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ISession seems to leak memory, when not calling close()
PostPosted: Fri Jan 16, 2009 4:04 am 
Newbie

Joined: Wed Sep 19, 2007 3:40 am
Posts: 2
Dear all,

I am using Nhibernate c#.Net. I am creating an Isession and I am using that session for the application beeing running.

When gathering data from the Isession e.g. a list of users and not saving refernces to those list, the memory slowly grows. I am even calling Session.clear() after gathering. that prevents the memory growing a bit, but not completely.

Is it recommended (mandatory) to get a new session for any operation and call close on the session after usage? Or should a new session be gathered from time to time (e.g. depending on memory usage).

Or should not be there a problem at all? Is there something I can do except calling of clear on the session?

Best regards,

Patrick

p.s. since this is general question I did not provide information such as mapping tables and Nhibernate version.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 23, 2009 10:30 am 
Beginner
Beginner

Joined: Thu Oct 26, 2006 4:45 am
Posts: 39
NHibernate might store results in its first level cache system, which uses some memory. Generally that should not be a problem at all.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.