Whoa...almost skipped right by this one.  Actually, as far as I remember 
(insert usual "I might be wrong caveat here), the same _doesn't_ apply for 
lists.

The reason fields do their own memory management is that their contents may 
grow and shrink over time.  For lists, this is not the case (at least as 
far as the OS is concerned).  Any lists that you put in a form cannot 
change (you can give it a new list of elements, but not add/remove from the 
existing list).  Therefore, like labels, lists do not free their contents 
when the form closes (because their contents are allocated in the form 
memory).  If you stick a new array in the list, you are responsible for 
freeing it yourself.

---

--On Monday, January 10, 2000 9:39 AM +0100 Aaron Ardiri <[EMAIL PROTECTED]> 
wrote:

>   i will now fix my code :)) thanks for pointing this out :) i assume
>   the same applies for Lists :) nice little memory leaks :)
>
> az.
> --
> Aaron Ardiri
> Java Certified Programmer      http://www.hig.se/~ardiri/
> University-College i G�vle     mailto:[EMAIL PROTECTED]
> SE 801 76 G�vle SWEDEN
> Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
> Mob: +46 70 656 1143           A/H: +46 26 10 16 11
>




Reply via email to