mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-18 17:10:35 +05:00
Fix memory leaks
This commit is contained in:
parent
d068bb8b46
commit
47d4ddf2b2
@ -230,9 +230,8 @@ bool BuildGUI_CompoundDlg::isValid( QString& )
|
||||
//=================================================================================
|
||||
bool BuildGUI_CompoundDlg::execute( ObjectList& objects )
|
||||
{
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
anObj = GEOM::GEOM_IShapesOperations::_narrow( getOperation() )->MakeCompound( myShapes );
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeCompound( myShapes );
|
||||
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
|
@ -293,9 +293,8 @@ bool BuildGUI_EdgeDlg::isValid (QString&)
|
||||
//=================================================================================
|
||||
bool BuildGUI_EdgeDlg::execute (ObjectList& objects)
|
||||
{
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
anObj = GEOM::GEOM_IShapesOperations::_narrow(getOperation())->MakeEdge(myPoint1, myPoint2);
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeEdge(myPoint1, myPoint2);
|
||||
|
||||
if (!anObj->_is_nil())
|
||||
objects.push_back(anObj._retn());
|
||||
|
@ -245,11 +245,8 @@ bool BuildGUI_FaceDlg::isValid( QString& )
|
||||
//=================================================================================
|
||||
bool BuildGUI_FaceDlg::execute( ObjectList& objects )
|
||||
{
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
bool isPlanarWanted = GroupWire->CheckButton1->isChecked();
|
||||
anObj = GEOM::GEOM_IShapesOperations::_narrow(
|
||||
getOperation() )->MakeFaceWires( myWires, isPlanarWanted );
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeFaceWires( myWires, GroupWire->CheckButton1->isChecked() );
|
||||
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
|
@ -259,10 +259,8 @@ bool BuildGUI_ShellDlg::isValid( QString& )
|
||||
//=================================================================================
|
||||
bool BuildGUI_ShellDlg::execute( ObjectList& objects )
|
||||
{
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
anObj = GEOM::GEOM_IShapesOperations::_narrow(
|
||||
getOperation() )->MakeShell( myFacesAndShells );
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeShell( myFacesAndShells );
|
||||
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
|
@ -267,9 +267,7 @@ bool BuildGUI_SolidDlg::isClosed(int i)
|
||||
return false;
|
||||
}
|
||||
|
||||
GEOM::GEOM_IMeasureOperations_ptr anOp = myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
|
||||
|
||||
// GEOM::GEOM_IMeasureOperations_var anOp = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_IMeasureOperations_var anOp = myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() );
|
||||
|
||||
// Detect kind of shape and parameters
|
||||
aKind = anOp->KindOfShape(aShape, anInts, aDbls);
|
||||
@ -295,17 +293,17 @@ bool BuildGUI_SolidDlg::execute( ObjectList& objects )
|
||||
{
|
||||
bool toCreateSingleSolid = GroupSolid->CheckButton1->isChecked();
|
||||
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
|
||||
if ( toCreateSingleSolid ) {
|
||||
GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow(
|
||||
getOperation() )->MakeSolidShells( myShells );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeSolidShells( myShells );
|
||||
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
}
|
||||
else {
|
||||
for ( int i = 0, n = myShells.length(); i< n; i++ ) {
|
||||
GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow(
|
||||
getOperation() )->MakeSolidShell( myShells[ i ] );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeSolidShell( myShells[ i ] );
|
||||
|
||||
if ( !anObj->_is_nil() )
|
||||
objects.push_back( anObj._retn() );
|
||||
|
@ -252,10 +252,8 @@ bool BuildGUI_WireDlg::isValid (QString& msg)
|
||||
//=================================================================================
|
||||
bool BuildGUI_WireDlg::execute (ObjectList& objects)
|
||||
{
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
anObj = GEOM::GEOM_IShapesOperations::_narrow(getOperation())->
|
||||
MakeWire(myEdgesAndWires, GroupArgs->SpinBox_DX->value());
|
||||
GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
|
||||
GEOM::GEOM_Object_var anObj = anOper->MakeWire(myEdgesAndWires, GroupArgs->SpinBox_DX->value());
|
||||
|
||||
if (!anObj->_is_nil())
|
||||
objects.push_back(anObj._retn());
|
||||
|
Loading…
Reference in New Issue
Block a user