mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-10 13:51:37 +00:00
Add new CrashRecoveryContextCleanup subclass: CrashRecoveryContextDeleteCleanup. This deletes the object, not just calls its destructor.
llvm-svn: 127855
This commit is contained in:
parent
33eddc52d3
commit
4a4428a5bc
@ -117,6 +117,18 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class CrashRecoveryContextDeleteCleanup
|
||||
: public CrashRecoveryContextCleanup
|
||||
{
|
||||
T *resource;
|
||||
public:
|
||||
CrashRecoveryContextDeleteCleanup(T *resource) : resource(resource) {}
|
||||
virtual void recoverResources() {
|
||||
delete resource;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct CrashRecoveryContextTrait {
|
||||
static inline CrashRecoveryContextCleanup *createCleanup(T *resource) {
|
||||
|
Loading…
Reference in New Issue
Block a user