i have the following code snapshot:
public void getResults( String expression, String collection ){
ReferenceList list;
Vector <ReferenceList> lists = new <ReferenceList> Vector();
list = invertedIndex.get( 1 )//invertedIndex is class member
lists.add(list);
}
when the method is finished, i supose that the local objects ( list, lists) are "destroyed". Can you tell if the memory occupied by list stored in invertedIndex is released as well? Or does java allocate new memory for list when assigning list = invertedIndex.get( 1 );