Managing memory limitation
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, May 7, 2003 09:39 PM

Hi friend,
I have 3 modules namely A, B & C.

Module C has the core business logic. Module A & B will be invoked by other applications by sending databse records continuously. In order to process these records Module C has to be invoked by Module A & B. Module C has to maintain the state for each record inorder to process the record and then return the same.
If A & B instantiate C for every record, out of memory problem may occur becoz of lot of objects created.
Static memebrs can't be used becoz state has to be maintained in module C.

Could U pls suggest other alternatives ?

Re: Managing memory limitation

Posted By:   Jeanne_Boyarsky  
Posted On:   Thursday, May 8, 2003 05:54 PM

If module A & B don't need the data after the database transaction is complete, set the reference to C to null. Then the extra C objects will be garbage collected.
About | Sitemap | Contact