Return By Value

Return a brand new object or primitive value, a clone/copy of the object/primitive you are returning.

For instance, in C++,

struct RECT { int x, y, width, height };
...
RECT bounds;
RECT getBounds() { return bounds; }

Compare ReturnByReference.


CategoryCpp