Home > JAVA > Java Can Have A Memory Leak Dude!

Java Can Have A Memory Leak Dude!

So you think there is no memory leak in java? Garbage Collector? Well, everything has its weakness. There is an easy way programmers in java can have a memory leak.

Did you say something?! Don’t believe me?! I’m not making fun of you! Okay then check out this post

Categories: JAVA Tags:
  1. Al3baidly
    September 20th, 2007 at 15:22 | #1

    yes, that’s right. when we create a class A and then we create class B referenced inside A, we then he to dereference class B if it is not needed. if it is not dereferenced it will stay in memory. Also if we created an object to class and we never used it in the program, memory leakage will occur because the garbage collector will not remove it. Also if we have not released resources in the finally block, also memory leakage will occur.
    the question is how can I know that leakage does occur in my program?.we do use inner class a lot especially in event handlers.

  1. No trackbacks yet.