Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
CWins48117yWhat does "keep your country clean" mean in that case?
Should i dispose people that are no longer referenced?
Shall i be like java or shall i kill homeless people? Be more clear!!! -
sSam15017y@aviad-rom @thebinaryfool it can happen anywhere if you just keep the reference to an instance it won't be collected.
-
afreitas2547y@thebinaryfool I once found a very obscure bug in Java 6 that had to do with leaking non-heap memory. It took me days to track down and reproduce and ended up being one of the main selling points when I was trying to convince my manager to move our product to Java 8. I still consider it a badge of honor
-
@aviad-rom there is a horrible thing called circular references, that can cause an object to never be collected. JavaRx tends to do that if Iremember correctly. Also, JNI is very dangerous and can leak heap memory.
-
@magicMirror cyclic references are not the problem, that's what the mark-and-sweep collector is for
Garbage collection still doesn't make Java a good language (especially since it's not a feature of the language itself) -
nicholai8937yI imagine government instances be like "Parents dead. Orphan detected. In the wastebin with this one"
-
@Krokoklemme as long as one of the objects in the cycle is reachable from the root... you get the picture.
-
@rantalicious 1.) I don't have to care any more about my resources in C++ than I have to in Java (ever heard of RAII?)
2.) There are GC's for C and C++ as well
3.) A GC isn't a language feature, it's a feature of the runtime a language runs on -
@rantalicious of course there's no possibility to manually free memory, because Java was designed to be *used* with a GC, but again: that doesn't really make it a language feature (at least not in the way I'd imagine a lang feature)
And I like your analogy, I sure will keep it in mind
Java 🎉
undefined
java corejava j2ee