fix: memory leak from missing deletes of raw heap allocations; big issue within create_shape() python lib

This commit is contained in:
shmoodyyy
2025-03-23 14:42:12 +01:00
committed by Thomas Krijnen
parent 4594f596c2
commit c6e3ac4155
4 changed files with 15 additions and 1 deletions
+10
View File
@@ -13,6 +13,16 @@ ifcopenshell::geometry::Converter::Converter(const std::string& geometry_library
settings_ = mapping_->settings();
}
ifcopenshell::geometry::Converter::~Converter()
{
if (kernel_ != nullptr) {
delete kernel_;
}
if (mapping_ != nullptr) {
delete mapping_;
}
}
namespace {
void substitute_with_box_based_on_density(IfcGeom::ConversionResults& items, double& density) {
int nv = 0;