Java unreachable linked list branch garbage collection -


i have 'disfigured' linked list has following structure:

a -> b -> c -> d -> e           ^           |           g           ^           |           f 

suppose have reference pointing , reference pointing f. want branch f->g deleted memory.

is enough set reference f null , rely on gc remove branch memory?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -