[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] An other OO problem.
From:       Rob <sourceforge-raindog2 () kudla ! org>
Date:       2009-01-20 15:43:00
Message-ID: 200901201043.00240.sourceforge-raindog2 () kudla ! org
[Download RAW message or body]

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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic