Yes, it makes a copy - of the pointer.

The pointer on the array and your other pointer are
now pointing to the same object.

Only once you set both pointers to “null” or let
them go out of scope, will the actual object be
destroyed.

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 17:12
> To: CTJUG Forum
> Subject: [CTJUG Forum] Re: Silly Question about Collections
> and Pointers
>
>
>
> Thanks for that, I remember the remove references and wait for GC to
> come and do the dirtywork, but I'm still curious to know if pushing an
> object on to an array makes a copy, and if so, how does it know to do
> that?
>
>
>
>
>



--~--~---------~--~----~------------~-------~--~----~
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