Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Clear method and Garbage Collector

843811Nov 12 2001 — edited Nov 12 2001
Hi Gurus,
Does the Clear method (hashtable, vector etc..) is a good option for garbage collection ?
In other words, if I have a vector V with 100 elements and I perform a V.clear(), am I sure that the 100 elements are now candidates for the Garbage Collection ?
Or is it better to write a loop performing a NULL assignment for each element of the vector ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2001
Added on Nov 12 2001
6 comments
222 views