ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: iBatis cleanup
Date Fri, 05 Oct 2007 13:57:04 GMT
As with anything, you can set them to null just to be safe - if you do
that, the GC *may* get them sooner than if you don't.

If you don't set them to null, they'll remain referenced by the
containing object and not be collectible until the containing objects
are destroyed by the GC, which is kind of indeterminable. :-)

Larry


On 10/5/07, Tom Henricksen <TomH@a-t-g.com> wrote:
>
> We have an application that has a ServletContextListener that creates three
> SqlMapClients in the contextInitialized.  When the application is shutting
> down(in the contextDestroyed) should we just null out those SqlMapClient or
> does it matter.
>
>
>
> Called from the contextDestroyed
>
>
>
> public static void stopService() {
>
>       //Get ready for garbage collection
>
>       singleton = null;
>
>       reportingClientSingleton = null;
>
>       nestedTransactionSingleton = null;
>
>     }
>
>
>
> We have some memory leaks from our Websphere production environment and I
> just want tidy things up.
>
>
>
> Thanks,
>
>
>
> Tom Henricksen
>  Consultant
>  Advanced Technologies Group, Inc.

Mime
View raw message