[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object copy function question
[Thread Prev] | [Thread Next]
- Subject: Re: Object copy function question
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Fri, 6 Sep 2024 00:54:14 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 06/09/2024 à 00:13, Bruce Steers a écrit :
A method like CopyData or CopyNew or CopyContents or some other relevant word that copies an array contents as an actual copy without referencing would be awesome. The Word Copy kinda misleads to think you will get a true copy of the data instead of references. I've had to recursively copy arrays within arrays in some code to overcome the referencing.Just a thought 😊
There is no "false" or "true" copy method, but "shallow" and "deep" copy.You can't have a deep copy method of an array (or collection) contents in Gambas, as there is no standard way for the interpreter to know how to copy an object.
Regards, -- Benoît Minisini.
Re: Object copy function question | Fabien Bodard <gambas.fr@xxxxxxxxx> |
Object copy function question | Linus <olivier.cruilles@xxxxxxxx> |
Re: Object copy function question | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Object copy function question | Bruce Steers <bsteers4@xxxxxxxxx> |