Freeing of lazily loaded inst attrs

This commit is contained in:
Thomas Krijnen
2018-03-21 17:29:37 +01:00
parent 0cbe984c71
commit 77e0d9cca7
+5 -3
View File
@@ -969,10 +969,12 @@ std::string IfcEntityInstanceData::toString(bool upper) const {
}
IfcEntityInstanceData::~IfcEntityInstanceData() {
for (size_t i = 0; i < getArgumentCount(); ++i) {
delete attributes_[i];
if (attributes_ != NULL) {
for (size_t i = 0; i < getArgumentCount(); ++i) {
delete attributes_[i];
}
delete[] attributes_;
}
delete[] attributes_;
}
unsigned IfcEntityInstanceData::set_id(boost::optional<unsigned> i) {