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.



_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to