1. <legend id='qH1Sa'><style id='qH1Sa'><dir id='qH1Sa'><q id='qH1Sa'></q></dir></style></legend>
      <tfoot id='qH1Sa'></tfoot>
        <bdo id='qH1Sa'></bdo><ul id='qH1Sa'></ul>

      <small id='qH1Sa'></small><noframes id='qH1Sa'>

      1. <i id='qH1Sa'><tr id='qH1Sa'><dt id='qH1Sa'><q id='qH1Sa'><span id='qH1Sa'><b id='qH1Sa'><form id='qH1Sa'><ins id='qH1Sa'></ins><ul id='qH1Sa'></ul><sub id='qH1Sa'></sub></form><legend id='qH1Sa'></legend><bdo id='qH1Sa'><pre id='qH1Sa'><center id='qH1Sa'></center></pre></bdo></b><th id='qH1Sa'></th></span></q></dt></tr></i><div id='qH1Sa'><tfoot id='qH1Sa'></tfoot><dl id='qH1Sa'><fieldset id='qH1Sa'></fieldset></dl></div>

      2. JDBC 垃圾回收

        JDBC garbage collection(JDBC 垃圾回收)

          <small id='YDjiu'></small><noframes id='YDjiu'>

          <i id='YDjiu'><tr id='YDjiu'><dt id='YDjiu'><q id='YDjiu'><span id='YDjiu'><b id='YDjiu'><form id='YDjiu'><ins id='YDjiu'></ins><ul id='YDjiu'></ul><sub id='YDjiu'></sub></form><legend id='YDjiu'></legend><bdo id='YDjiu'><pre id='YDjiu'><center id='YDjiu'></center></pre></bdo></b><th id='YDjiu'></th></span></q></dt></tr></i><div id='YDjiu'><tfoot id='YDjiu'></tfoot><dl id='YDjiu'><fieldset id='YDjiu'></fieldset></dl></div>
            <tbody id='YDjiu'></tbody>
        1. <tfoot id='YDjiu'></tfoot>
            <bdo id='YDjiu'></bdo><ul id='YDjiu'></ul>
                  <legend id='YDjiu'><style id='YDjiu'><dir id='YDjiu'><q id='YDjiu'></q></dir></style></legend>

                  本文介绍了JDBC 垃圾回收的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  What happens if i don't close resultset or preparedstatements.

                  Will they be closed and released by the garbage collector.

                  I'm asking this for local variables inside a function.

                  Do you know any documentation about this ?

                  解决方案

                  If your code does not close ResultSets or PreparedStatements when done using then, your application will hog scarce resources — like cursors — in the database. See, for example:

                  • ResultSet not closed when connection closed?
                  • What happens to the original resultSet when it is returned from a method into a new object?

                  The garbage collector does not know anything about closing ResultSets or PreparedStatements, so GC won't automagically take care of that for you. What will? Java 7's try-with-resources statement!

                  这篇关于JDBC 垃圾回收的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                  ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                  How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                  Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                  Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                  Why a sawtooth shaped graph?(为什么是锯齿形图形?)

                  • <bdo id='fsBR0'></bdo><ul id='fsBR0'></ul>
                    <tfoot id='fsBR0'></tfoot>
                  • <legend id='fsBR0'><style id='fsBR0'><dir id='fsBR0'><q id='fsBR0'></q></dir></style></legend>

                    <small id='fsBR0'></small><noframes id='fsBR0'>

                      <tbody id='fsBR0'></tbody>
                  • <i id='fsBR0'><tr id='fsBR0'><dt id='fsBR0'><q id='fsBR0'><span id='fsBR0'><b id='fsBR0'><form id='fsBR0'><ins id='fsBR0'></ins><ul id='fsBR0'></ul><sub id='fsBR0'></sub></form><legend id='fsBR0'></legend><bdo id='fsBR0'><pre id='fsBR0'><center id='fsBR0'></center></pre></bdo></b><th id='fsBR0'></th></span></q></dt></tr></i><div id='fsBR0'><tfoot id='fsBR0'></tfoot><dl id='fsBR0'><fieldset id='fsBR0'></fieldset></dl></div>