Review suggestions

This commit is contained in:
Leo 2022-08-13 13:44:03 +02:00 committed by Leo Alt
parent 18ce69ebbd
commit 898ad25aab

View File

@ -85,10 +85,10 @@ Data locations are not only relevant for persistency of data, but also for the s
// The following does not work; it would need to create a new temporary / // The following does not work; it would need to create a new temporary /
// unnamed array in storage, but storage is "statically" allocated: // unnamed array in storage, but storage is "statically" allocated:
// y = memoryArray; // y = memoryArray;
// On the other hand: "delete y" is not valid, as assignments to local variables // Similarly, "delete y" is not valid, as assignments to local variables
// referencing storage objects can only be made from existing storage objects. // referencing storage objects can only be made from existing storage objects.
// It would "reset" the pointer, but there is no sensible location it could point to. // It would "reset" the pointer, but there is no sensible location it could point to.
// See "delete" under Operators // For more details see the documentation of the "delete" operator.
// delete y; // delete y;
g(x); // calls g, handing over a reference to x g(x); // calls g, handing over a reference to x
h(x); // calls h and creates an independent, temporary copy in memory h(x); // calls h and creates an independent, temporary copy in memory