forked from OSchip/llvm-project
Fix some memory leak in MLIRContext with respect to registered types/attributes interfaces
Differential Revision: https://reviews.llvm.org/D83618
This commit is contained in:
parent
47872adf6a
commit
3b04af4d84
|
@ -331,6 +331,12 @@ public:
|
|||
|
||||
public:
|
||||
MLIRContextImpl() : identifiers(identifierAllocator) {}
|
||||
~MLIRContextImpl() {
|
||||
for (auto typeMapping : registeredTypes)
|
||||
typeMapping.second->~AbstractType();
|
||||
for (auto attrMapping : registeredAttributes)
|
||||
attrMapping.second->~AbstractAttribute();
|
||||
}
|
||||
};
|
||||
} // end namespace mlir
|
||||
|
||||
|
|
Loading…
Reference in New Issue