[Gambas-user] An other OO problem.
Rob
sourceforge-raindog2 at ...94...
Tue Jan 20 16:43:00 CET 2009
On Tuesday 20 January 2009 10:13, Jussi Lahtinen wrote:
> Maybe something like "Returns a copy of the array of object references."
> ? I'm really NOT expert of this topic! I understand that result as
> shallow copy, as the way that wikipedia describe it (
> http://en.wikipedia.org/wiki/Object_copy ).
Actually, given the definitions there, what Gambas is doing is a deep copy.
In a shallow copy, there's only one object (array, in this case) when the
copy is complete, and two references to it (and the originally declared
second array's allocated memory is lost to either garbage collection or a
memory leak), but in a deep copy, there are two independent copies of the
array when you're done. In Gambas the latter is true.
Rob
More information about the User
mailing list