[Gambas-bugtracker] Bug #2443: Class array copy

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Wed Jan 5 11:43:12 CET 2022


Comment #3 by Benoît MINISINI:

It's a one-level deep copy, not a two-level one. The contents of the array *is* copied.

You must understand that an array of objects is actually an array of *object references*. You manipulate objects by reference only, never by value.

It's exactly the same in Java, and all other dynamic object languages I know (forget C++).

More information about the Bugtracker mailing list