Skip to content

Commit

Permalink
fixes #1999: Tessellation data or OpenInventor data memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 3, 2017
1 parent 97ca11f commit a289538
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mod/Import/App/AppImportPy.cpp
Expand Up @@ -186,6 +186,7 @@ class Module : public Py::ExtensionModule<Module>
xcaf.loadShapes();
#endif
pcDoc->recompute();
hApp->Close(hDoc);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Expand Down Expand Up @@ -290,6 +291,8 @@ class Module : public Py::ExtensionModule<Module>
throw Py::Exception();
}
}

hApp->Close(hDoc);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Import/Gui/AppImportGuiPy.cpp
Expand Up @@ -408,6 +408,7 @@ class Module : public Py::ExtensionModule<Module>
ImportOCAFExt ocaf(hDoc, pcDoc, file.fileNamePure());
ocaf.loadShapes();
pcDoc->recompute();
hApp->Close(hDoc);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Expand Down Expand Up @@ -501,6 +502,8 @@ class Module : public Py::ExtensionModule<Module>
throw Py::Exception();
}
}

hApp->Close(hDoc);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Expand Down Expand Up @@ -591,6 +594,7 @@ class Module : public Py::ExtensionModule<Module>

OCAFBrowser browse(hDoc);
browse.load(dlg->findChild<QTreeWidget*>());
hApp->Close(hDoc);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Expand Down

0 comments on commit a289538

Please sign in to comment.