201
Comments
  • 6
    I've seen memory leaks in java code. GC isn't always perfect
  • 0
    @aviad-rom can you share if you remember !
  • 23
    What 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!!!
  • 1
    @aviad-rom @thebinaryfool it can happen anywhere if you just keep the reference to an instance it won't be collected.
  • 6
    @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
  • 3
    @CWins are people garbage??
  • 14
    Java also confuses "its" and "it's".
  • 2
    @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.
  • 2
    @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)
  • 4
    I imagine government instances be like "Parents dead. Orphan detected. In the wastebin with this one"
  • 1
    @Krokoklemme as long as one of the objects in the cycle is reachable from the root... you get the picture.
  • 2
    @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
  • 1
    @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
Add Comment