Is it necessary to explicitly disconnect from the database when using Java?

After completing the job in Java, you must disconnect from the database? If the connection is not disconnected, will it lead to memory leakage?

Solution

You should provide more details, such as the framework or other content you are using

Anyway, do you use JDBC? If so, you should close the following objects using their respective close () methods: statement, resultset, and connection

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>