[Part] - Fix memory leaks

This commit is contained in:
vosk
2021-01-28 15:45:00 +01:00
committed by wmayer
parent 92846ad0f1
commit 4bd5c2669d
3 changed files with 1 additions and 5 deletions
-2
View File
@@ -68,13 +68,11 @@ void ViewProviderLine::attach ( App::DocumentObject *obj ) {
sep->addChild ( pCoords );
SoIndexedLineSet *pLines = new SoIndexedLineSet ();
pLines->ref();
pLines->coordIndex.setNum(3);
pLines->coordIndex.setValues(0, 3, lines);
sep->addChild ( pLines );
SoTranslation *textTranslation = new SoTranslation ();
textTranslation->ref ();
textTranslation->translation.setValue ( SbVec3f ( -size * 49. / 50., size / 30., 0 ) );
sep->addChild ( textTranslation );
-2
View File
@@ -70,13 +70,11 @@ void ViewProviderPlane::attach ( App::DocumentObject *obj ) {
sep->addChild ( pCoords );
SoIndexedLineSet *pLines = new SoIndexedLineSet ();
pLines->ref();
pLines->coordIndex.setNum(6);
pLines->coordIndex.setValues(0, 6, lines);
sep->addChild ( pLines );
SoTranslation *textTranslation = new SoTranslation ();
textTranslation->ref ();
textTranslation->translation.setValue ( SbVec3f ( -size * 49. / 50., size * 9./10., 0 ) );
sep->addChild ( textTranslation );
+1 -1
View File
@@ -226,7 +226,7 @@ void PropertyGeometryList::Restore(Base::XMLReader &reader)
reader.readEndElement("GeometryList");
// assignment
setValues(values);
setValues(std::move(values));
}
App::Property *PropertyGeometryList::Copy(void) const