Example



 

The effect of the assignment statement is to copy the reference from CREF1 to CREF2. As a result, the reference in CREF3 also points to the object C_COUNTER<1>. No more references point to the object C_COUNTER<2>, and it is automatically deleted by the garbage collection. The internal name C_COUNTER<2> is now free again.