my dog learned polymorphism*
The moose likes Java in General and the fly likes Why its called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Why its called "heap pollution"?" Watch "Why its called "heap pollution"?" New topic
Author

Why its called "heap pollution"?

Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi all,

So I came across the term Heap Pollution and after googling I know what it means BUT my issue is , I couldn't relate the name with the scenario. Why its called Heap Pollution? Basically, if I were to guess what it means from the name itself I couldn't have.

Why we say heap is polluted if we are pointing to wrong parameterized structure? Like, Garbage Collection - It makes so much sense.

Also, is heap pollution word got more popular with Java 5? The behavior existed in earlier java versions too. Its just that Java 5 is now more explicitly pointing to that issue as we have Generics.

Anyways, just my thoughts at end of tiring day so may sound little off the track

Regards,
Maulin
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I bet you've never heard of Heap Global Warming, which is even worse


[My Blog]
All roads lead to JavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why its called "heap pollution"?