Showing posts with label memory-leaks. Show all posts
Showing posts with label memory-leaks. Show all posts

Friday, December 7, 2012

Could we have memory leaks in Java?

Yes, here it is explained why.

Unused references

Code that keep useless references to objects that will never use again, and at the same time never drop those references; one may say those cases are not "true" memory leaks because there are still references to those objects around, but if the program never use those references again and also never drop them, it is completely equivalent to (and as bad as) a "true memory leak".

Java Native Interface

While implementing JNI functionality, you could