Lines Matching full:resource

123 /// resource recovery.
152 /// \tparam T Type of controlled resource.
162 T *resource;
163 CrashRecoveryContextCleanupBase(CrashRecoveryContext *context, T *resource) in CrashRecoveryContextCleanupBase() argument
164 : CrashRecoveryContextCleanup(context), resource(resource) {} in CrashRecoveryContextCleanupBase()
168 /// \param x Pointer to the resource recovered by this handler.
180 /// Cleanup handler that reclaims resource by calling destructor on it.
186 T *resource) in CrashRecoveryContextDestructorCleanup() argument
188 CrashRecoveryContextDestructorCleanup<T>, T>(context, resource) {} in CrashRecoveryContextDestructorCleanup()
191 this->resource->~T(); in recoverResources()
195 /// Cleanup handler that reclaims resource by calling 'delete' on it.
200 CrashRecoveryContextDeleteCleanup(CrashRecoveryContext *context, T *resource) in CrashRecoveryContextDeleteCleanup() argument
202 CrashRecoveryContextDeleteCleanup<T>, T>(context, resource) {} in CrashRecoveryContextDeleteCleanup()
204 void recoverResources() override { delete this->resource; } in recoverResources()
207 /// Cleanup handler that reclaims resource by calling its method 'Release'.
213 T *resource) in CrashRecoveryContextReleaseRefCleanup() argument
215 T>(context, resource) {} in CrashRecoveryContextReleaseRefCleanup()
217 void recoverResources() override { this->resource->Release(); } in recoverResources()
220 /// Helper class for managing resource cleanups.
222 /// \tparam T Type of resource been reclaimed.
223 /// \tparam Cleanup Class that defines how the resource is reclaimed.
226 /// context to ensure that the resource will be reclaimed even in the case of
232 /// std::unique_ptr<Resource> R(new Resource());
247 /// the current CrashRecoveryContext and the resource is reclaimed by the
249 /// and the resource is reclaimed by cleanup object registered in the recovery