Results 1 to 5 of 5
Thread: Object Reuse
- 03-24-2009, 02:38 PM #1
Member
- Join Date
- Mar 2009
- Location
- India
- Posts
- 16
- Rep Power
- 0
- 03-24-2009, 02:44 PM #2
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
Knowing the context would help. Please post some code and point out where the problems are that you know of.
- 03-24-2009, 02:47 PM #3
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
So a lot of objects are being created. So what. As I have told you before, as long as you are not hanging on to these references outside of their intended scope, this is not a problem.
How much do you currently have your max heap size set to? For truely large applications 1024m should be enough. If you have less than that, then increase it to that.
Now, as soon as the request is finished, these objects you're speaking of should be garbage collected, and so should not be a problem. If you see that requests are finishing and the objects remain, then check your code. You are not getting rid of the references. It is that simple.
- 03-24-2009, 02:51 PM #4
create a constructor for your object in your class and reuse it through out your classess methods.
- 03-25-2009, 05:21 AM #5
Member
- Join Date
- Mar 2009
- Location
- India
- Posts
- 16
- Rep Power
- 0
Similar Threads
-
Struts: Reuse data across multiple ActionForms problem
By Tequila_Burp in forum Web FrameworksReplies: 3Last Post: 12-12-2012, 10:04 AM -
Operator < cannot be applied to java.lang.Object, Object
By Albert in forum Advanced JavaReplies: 2Last Post: 11-26-2010, 02:12 AM -
how to pass an arraylist from an object back to the parent object that it was created
By george_a in forum New To JavaReplies: 1Last Post: 03-04-2009, 06:14 PM -
Parsing a superclass object to subclass object dynamicly
By Andrefs in forum Advanced JavaReplies: 1Last Post: 07-22-2008, 04:27 PM -
[SOLVED] If a object equals another object, do they contain the same data?
By bobleny in forum New To JavaReplies: 1Last Post: 04-17-2008, 10:10 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks