res close event