When releasing samples, chain the sample tree into a linked list and release the list range with two pointer assignments (allows the free operation to be made lockless).