Add onDestroy event handler