ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: svn commit: r450863 - in /ant/core/trunk: CONTRIBUTORS WHATSNEW contributors.xml src/main/org/apache/tools/ant/types/resources/URLResource.java
Date Thu, 28 Sep 2006 14:41:39 GMT
URL:
> http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/URLResource.java?view=diff&rev=450863&r1=450862&r2=450863
>
> ==============================================================================
> ---
> ant/core/trunk/src/main/org/apache/tools/ant/types/resources/URLResource.java
> (original)
> +++
> ant/core/trunk/src/main/org/apache/tools/ant/types/resources/URLResource.java
> Thu Sep 28 07:23:26 2006
> @@ -361,7 +361,6 @@
>       * @throws Throwable on error.
>       */
>      protected void finalize() throws Throwable {
> -        close();
>          conn = null;
>          super.finalize();
>      }


My advice would be to remove the finalize method completely.
Having a finalize method is not good practice - it interacts badly
with GC.
the current version of this method in effect does nothing except trying to
"help" gc.
see:

http://devresource.hp.com/drc/resources/jmemmodel/index.jsp



---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message