Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 55064 invoked by uid 500); 14 Jun 2001 19:13:01 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 54682 invoked from network); 14 Jun 2001 19:12:01 -0000 Received: from smtp5vepub.gte.net (HELO smtp5ve.mailsrvcs.net) (206.46.170.26) by h31.sny.collab.net with SMTP; 14 Jun 2001 19:12:01 -0000 Received: from computer (adsl-138-88-50-50.dc.adsl.bellatlantic.net [138.88.50.50]) by smtp5ve.mailsrvcs.net (8.9.1/8.9.1) with SMTP id TAA17026250 for ; Thu, 14 Jun 2001 19:11:37 GMT Message-ID: <006a01c0f505$cb233e20$87c6fea9@computer> From: "Luba Powell" To: References: Subject: Re: memory allocation Date: Thu, 14 Jun 2001 15:11:18 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2462.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Not to worry. The only time that I know you need to set objects to null is when you write servers and inside you (while (true).. eternal loop. ----- Original Message ----- From: To: Sent: Thursday, June 14, 2001 1:41 PM Subject: memory allocation hi all , i want to ask something about jsp pages sample jsp code = ************************************************************** <%@ page import = "java.util.*" %> <%@ page import = "MyBean" %> <%@ page contentType="text/html;charset=ISO-8859-9" %> <% ArrayList al = new ArrayList(); mybean.showData(al); // we are going to fill ArrayList Iterator it = al.iterator(); while( it.hasNext() ) { %> <%=(String)it.next()%> <% } //while al = null ; // should i do this ? or is it going to be garbage collected by itself it = null ; // shoul i do this ? or is it going to be garbage collected by itself %> ************************************************************** my_bean object will be garbage collected because it' scope is page but what about ArrayList and Iterator objects ? thanks Regards Altug B. Alt�ntas