添加ScopeGuard