Skip to content

Commit

Permalink
+ fix critical memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 13, 2015
1 parent f53fd0f commit 618192f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp
Expand Up @@ -246,11 +246,9 @@ void getLocalCoordinateSystem(const SbVec3f& z, SbVec3f& y, SbVec3f& x)
void ViewProviderFemConstraint::createPlacement(SoSeparator* sep, const SbVec3f &base, const SbRotation &r)
{
SoTranslation* trans = new SoTranslation();
trans->ref();
trans->translation.setValue(base);
sep->addChild(trans);
SoRotation* rot = new SoRotation();
rot->ref();
rot->rotation.setValue(r);
sep->addChild(rot);
}
Expand All @@ -269,11 +267,9 @@ void ViewProviderFemConstraint::createCone(SoSeparator* sep, const double height
{
// Adjust cone so that the tip is on base
SoTranslation* trans = new SoTranslation();
trans->ref();
trans->translation.setValue(SbVec3f(0,-height/2,0));
sep->addChild(trans);
SoCone* cone = new SoCone();
cone->ref();
cone->height.setValue(height);
cone->bottomRadius.setValue(radius);
sep->addChild(cone);
Expand Down Expand Up @@ -302,7 +298,6 @@ void ViewProviderFemConstraint::updateCone(const SoNode* node, const int idx, co
void ViewProviderFemConstraint::createCylinder(SoSeparator* sep, const double height, const double radius)
{
SoCylinder* cyl = new SoCylinder();
cyl->ref();
cyl->height.setValue(height);
cyl->radius.setValue(radius);
sep->addChild(cyl);
Expand All @@ -329,7 +324,6 @@ void ViewProviderFemConstraint::updateCylinder(const SoNode* node, const int idx
void ViewProviderFemConstraint::createCube(SoSeparator* sep, const double width, const double length, const double height)
{
SoCube* cube = new SoCube();
cube->ref();
cube->width.setValue(width);
cube->depth.setValue(length);
cube->height.setValue(height);
Expand Down

0 comments on commit 618192f

Please sign in to comment.