[fpc-devel] Unicodestring branch, please test and help fixing

peter green plugwash at p10link.net
Tue Sep 9 22:51:06 CEST 2008


 
> Check again...
I have just checked the manual and I don't see anything I can use to 
make sure my custom type starts at a predictable state initially 
(nessacery so they assignment operator can safely clean up before making 
the assignment). Nor do I see anything to do automatic clean up when the 
variable goes out of scope.

> But it is still a bad idea (like c++) How does one recognize a deep vs 
> shallow string copy f.e. 
You don't have to! With the java system the string type is immutable 
anyway so there is no point in doing a deep copy. With the delphi/fpc 
system the string type automatically makes a shallow copy initially and 
then copies the actual data if and when it becomes nessacery to do so.






More information about the fpc-devel mailing list