You can prevent memory leaks by watching for some common problems. Collection classes, such as hashtables and vectors, are common places to find the cause of a memory leak. This is particularly true if the class has been declared
staticand exists for the life of the application.Another common problem occurs when you register a class as an event listener without bothering to unregister when the class is no longer needed. Also, many times member variables of a class that point to other classes simply need to be set to null at the appropriate time.
Tuesday, March 30, 2010
Java memory leaks
http://www.ibm.com/developerworks/library/j-leaks/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment