better thread dealloc