A method for creating a reference in a scoped memory system, the scoped memory system including a scope graph of scoped memory areas, wherein each scoped memory area is suitable for the allocation of objects therein for access by software threads and has associated a thread count for indicating that the scoped memory area is discardable, the method comprising the steps of: allocating a target object in a target scoped memory area; storing an index associated with the target object of a depth of the target scoped memory area in the scope graph, wherein the depth of the target scoped memory area in the scope graph is a distance between the target scoped memory area and a root (300, 354) of the scope graph, wherein the index associated with the target object is stored in the target scoped memory area during allocation of the target object; allocating a source object in a source scoped memory area; storing an index associated with the source object of a depth of the source scoped memory area in the scope graph, wherein the depth of the source scoped memory area in the scope graph is a distance between the source scoped memory area and the root of the scope graph, wherein the index associated with the source object is stored in the source scoped memory area during allocation of the source object; in response to a determination that the source scoped memory area is at the same depth as or deeper than the target scoped memory area by comparing the index associated with the source object and the index associated with the target object, creating a reference from the target object to the source object, wherein the step of creating a reference from the target object to the source object is further responsive to a determination that the target scoped memory area and the source scoped memory area lie in a common branch of the scope graph. allocating a target object in a target scoped memory area; storing an index associated with the target object of a depth of the target scoped memory area in the scope graph, wherein the depth of the target scoped memory area in the scope graph is a distance between the target scoped memory area and a root (300, 354) of the scope graph, wherein the index associated with the target object is stored in the target scoped memory area during allocation of the target object; allocating a source object in a source scoped memory area; storing an index associated with the source object of a depth of the source scoped memory area in the scope graph, wherein the depth of the source scoped memory area in the scope graph is a distance between the source scoped memory area and the root of the scope graph, wherein the index associated with the source object is stored in the source scoped memory area during allocation of the source object; in response to a determination that the source scoped memory area is at the same depth as or deeper than the target scoped memory area by comparing the index associated with the source object and the index associated with the target object, creating a reference from the target object to the source object, wherein the step of creating a reference from the target object to the source object is further responsive to a determination that the target scoped memory area and the source scoped memory area lie in a common branch of the scope graph.