java memory management

Posted by pavlos on Stack Overflow See other posts from Stack Overflow or by pavlos
Published on 2010-04-19T16:50:49Z Indexed on 2010/04/19 16:53 UTC
Read the original article Hit count: 425

Filed under:
|
|

i have the following code snapshot:

public void getResults( String expression, String collection ){ ReferenceList list; Vector lists = new 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 );

© Stack Overflow or respective owner

Related posts about java

Related posts about memory