Reji Nair

Greenhorn
+ Follow
since Feb 04, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Reji Nair


Thank you Ernest,
Now I understand that those are the object of Iterator. I have mistaken them to CopyonWriteArrayList objects

Thanks and Regards
Reji
9 years ago
Hello experts,
I am using CopyonWriteArrayList in a multithreading environment in which traversal is quite often than mutation functions like addition,removal etc.
But when I check the heap dump using VisualVM, it is showing a very large number of Objects of CopyOnWriteArrayList is is getting created and garbage collected.
Please find the code sample below. I expect not more than three objects of the CopyOnWriteArrayList should be created in the following program. But in visualVM, it shows some figures around 12000.


Any help or suggestion is deeply appreciated.

Regards
Reji Nair
9 years ago