Fix memory leak in D3MFOpcPackage

- closes https://github.com/assimp/assimp/issues/4628
pull/4629/head
Kim Kulling 2022-07-08 10:17:11 +02:00 committed by GitHub
parent a1f9a299e9
commit e254f80a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -186,6 +186,9 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) :
D3MFOpcPackage::~D3MFOpcPackage() {
mZipArchive->Close(mRootStream);
delete mZipArchive;
for (auto tex : mEmbeddedTextures) {
delete mEmbeddedTextures[i];
}
}
IOStream *D3MFOpcPackage::RootStream() const {