protect from deallocation race