[Teneo] memory consumption keeps building up [message #604344] |
Wed, 04 April 2007 14:19 |
Parvez Messages: 181 Registered: July 2009 |
Senior Member |
|
|
Hi,
Every time user creates a project in our application we initialize a new
database (embedded HSQLDB) and hence we have to initialize HbDataStore.
I have number of emf models and nearly 100mb is consumed on each
hbds.initialize();
Before user can create another project, existing opened(if any)
project/database is closed and session is cleared.
These are the steps done on close of project:
session.flush(); //session obtained from teneo
session.clear();
//here shutdown statement is issued for the db and then
session.disconnect();
session.close();
HbHelper.INSTANCE.deRegisterDataStore(_dbName); // _dbName is
session factory name
HbHelper.INSTANCE.closeAll();
sessionFactory.close(); //session factory obtained from teneo
Runtime runtime = Runtime.getRuntime();
runtime.gc();
But it seems that emf objects created during models initialization
remains in memory and so if user creates another project then again
100mb is consumed and hence shortly runs out of memory.
So just wondering do I have to do something more about clearing?
Any suggestions to fix it?
Thanks.
Parvez
|
|
|
Powered by
FUDForum. Page generated in 0.02698 seconds