LGTM: [skip ci] fix: Resource not released in destructor

This commit is contained in:
wmayer
2020-07-25 14:48:59 +02:00
parent 16edad7afd
commit 584a1bf442
3 changed files with 3 additions and 3 deletions

View File

@@ -167,7 +167,7 @@ private:
// Defines all required member variables and functions for a
// single-value field
SO_SFIELD_SOURCE(SoSFMeshObject, const Mesh::MeshObject*, const Mesh::MeshObject*)
SO_SFIELD_SOURCE(SoSFMeshObject, Base::Reference<const Mesh::MeshObject>, Base::Reference<const Mesh::MeshObject>)
void SoSFMeshObject::initClass()

View File

@@ -45,7 +45,7 @@ namespace MeshGui {
class MeshGuiExport SoSFMeshObject : public SoSField {
typedef SoSField inherited;
SO_SFIELD_HEADER(SoSFMeshObject, const Mesh::MeshObject*, const Mesh::MeshObject*);
SO_SFIELD_HEADER(SoSFMeshObject, Base::Reference<const Mesh::MeshObject>, Base::Reference<const Mesh::MeshObject>);
public:
static void initClass(void);

View File

@@ -2363,7 +2363,7 @@ void ViewProviderMeshObject::updateData(const App::Property* prop)
ViewProviderMesh::updateData(prop);
if (prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) {
const Mesh::PropertyMeshKernel* mesh = static_cast<const Mesh::PropertyMeshKernel*>(prop);
this->pcMeshNode->mesh.setValue(mesh->getValuePtr());
this->pcMeshNode->mesh.setValue(Base::Reference<const Mesh::MeshObject>(mesh->getValuePtr()));
// Needs to update internal bounding box caches
this->pcMeshShape->touch();
}