Even though C++ popularized the concept of smart pointers, especially the
reference-counted variety, the immediate predecessor of one of the languages that inspired C++'s design had reference-counted references built into the language. C++ was inspired in part by
Simula67. Simula67's ancestor was
Simula I. Insofar as Simula I's
element is analogous to C++'s pointer without
null, and insofar as Simula I's process with a dummy-statement as its activity body is analogous to C++'s
struct (which itself is analogous to
C. A. R. Hoare's
record in then-contemporary 1960s work), Simula I had reference counted elements (i.e., pointer-expressions that house indirection) to processes (i.e., records) no later than September 1965, as shown in the quoted paragraphs below. Processes can be referenced individually. Physically, a process reference is a pointer to an area of memory containing the data local to the process and some additional information defining its current state of execution. However, for reasons stated in the Section 2.2 process references are always indirect, through items called
elements. Formally a reference to a process is the value of an expression of type
element. …
element values can be stored and retrieved by assignments and references to
element variables and by other means. The language contains a mechanism for making the attributes of a process accessible from the outside, i.e., from within other processes. This is called remote accessing. A process is thus a referenceable data structure. It is worth noticing the similarity between a process whose activity body is a dummy statement, and the record concept recently proposed by C. A. R. Hoare and
N. Wirth Because C++ borrowed
Simula's approach to memory allocationthe
new keyword when allocating a process/record to obtain a fresh
element to that process/recordit is not surprising that C++ eventually resurrected Simula's reference-counted smart-pointer mechanism within
element as well. == Features ==