It is a well known fact that passing objects into functions by reference (in C+ +) is more efficient than passing by value. Passing objects, created within functions, out of functions by reference could also be more efficient if it wasn't sure to cause memory-leak in the system. Programmers therefore resort to "pass-byreference, return-by-value". Here we first briefly look at why it is important to be able to return by reference, particularly for large dynamic objects in mathematical applications, and then present a new scheme for doing so. The new method can attain efficiency comparable to that of 'method of reference counting', but without the undesirable side-effects of the latter.
INTRODUCTION: