A parent thread counter corresponding to an object is created by a parent thread, where the parent thread counter includes a hierarchical counter data structure. A child thread counter of a child thread is created that includes the hierarchical counter data structure and passes the reference to the object from the parent thread to the child thread. The hierarchical counter data structure is updated in the parent thread counter to reference the child thread counter and in the child thread counter to point to the parent thread counter. The parent thread counter is then notified when the child thread has completed processing. As part of the updating, the parent and child thread counters employ a lock-free mechanism.