You should maybe rather store a weak or soft pointer to the
original objects in your array.

Kind regards from

Heinz
--
Dr. Heinz M. Kabutz (Maximum Solutions)
Sun Java Champion
Author of "The Java(tm) Specialists' Newsletter"
<http://www.javaspecialists.co.za/>
Tel: +27 (83) 340-5633 



> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] Behalf Of Sparky
> Sent: 09 March 2006 16:51
> To: CTJUG Forum
> Subject: [CTJUG Forum] Silly Question about Collections and Pointers
> 
> 
> 
> If you create a small object, set it properties, and push it on an
> array, then destroy it, recreate it, populate it with different data,
> and also push that onto an array, why do the object persist in the
> array. I'm really glad they do, I'd just think that an array stores
> references to your original objects so if you destroy the original
> object, the reference in the array would be destroyed too.
> 
> Such a silly question, can't find a good explanation.
> 
> 
> 
> 
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
-~----------~----~----~----~------~----~------~--~---

Reply via email to