Ah. You are right - destroy has been deprecated. Then I suggest to call it terminate.