-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have to work with an existing application and there is a List which stores all rendered objects in order to remove them later if the gui changes.
This is the List:
private List<Component> registeredComponents = new ArrayList<Component>();
Now I'm wondering if Java only stores references to the objects (ZK components) or if it does store a copy of the objects. The question is if I should remove this.
I think list will contain references only. This holds for all types of collections, not only ArrayLists.
Actually in java no way to "get hold of" the object itself. When you create a new object all you get is a reference to it.
Asked: 2013-11-06 15:34:40 +0800
Seen: 23 times
Last updated: Jan 19 '14
I think the answer is "it stores references."
roliroli ( 2013-11-07 10:14:54 +0800 )edit