View Single Post
Old 03-14-2010, 11:33 PM   #4 (permalink)
jacob.tabak
Knows Where the Search Button Is
 
Join Date: Mar 2010
Model: N/A
PIN: N/A
Carrier: Fledge
Posts: 43
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, this is standard practice in Java and an object oriented principle called composition. It's similar to a pointer in C++ and doesn't consume any more memory than a string variable would.

The only effect this will have on performance is that an object that is referenced by other active objects will not be garbage collected. However, in your case, it wouldn't make any sense for the original object to be garbage collected because it's in the background and will be displayed later.

So basically the only time this would have an adverse effect on performance is when you are needlessly passing around references to objects that should be garbage collected.
Offline   Reply With Quote