stop and deallocate