您的位置:首页 > 编程语言 > Java开发

java内存泄露,在什么地方最有可能出现内存泄露?

2013-08-13 14:15 435 查看
1 Review static instance and object

All of the classes which implemented a static instance and is invoked as singleton mode are need to be investigated . Especially if it has the static Hashtable,Vector and so on.

2 Review DB connection

DB connection number has increased to an amazing number , and there should be a way to optimize it. It would be a potential memory exhaustion risk.

3 Review Socket Connection

Socket connection numberis increased quickly as Appendix-C. All of the socket connections should beassured to be closed in future. Otherwise it would cause a potential memoryleak.

4 Review File Open

All of the File,BufferReader/Writer, Input/OputputStream should be assured to be closed.

5 Review Thread Invoking

All of the threads shouldnot have a reference from static instance. If not, even the thread is not alive,the thread instance will also not be released.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: