Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit c8f53f9

Browse files
jmirabelolivier-stasse
authored andcommitted
Fix DynamicPinocchio destructor
1 parent 7349c38 commit c8f53f9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/sot-dynamic-pinocchio.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,12 @@ DynamicPinocchio( const std::string & name)
233233

234234
DynamicPinocchio::~DynamicPinocchio( void ) {
235235
sotDEBUGIN(15);
236-
// if (0!=m_model){ delete m_model; m_model=NULL;}
237-
if (0!=m_data)
238-
{ delete m_data; m_data=NULL; }
239-
if (0!=m_model)
240-
{ delete m_model; m_model=NULL; }
236+
// TODO currently, m_model and m_data are pointers owned by the Python interpreter
237+
// so we should not delete them.
238+
// I (Joseph Mirabel) think it would be wiser to make them belong to this class but
239+
// I do not know the impact it has.
240+
//if (0!=m_data ) { delete m_data ; m_data =NULL; }
241+
//if (0!=m_model) { delete m_model; m_model=NULL; }
241242

242243
for( std::list< SignalBase<int>* >::iterator iter = genericSignalRefs.begin();
243244
iter != genericSignalRefs.end();

0 commit comments

Comments
 (0)