Skip to content

Commit ebe9eae

Browse files
committed
Unregister callbacks when destroying an InstructionExecutor
1 parent 000a6b7 commit ebe9eae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/ur_client_library/ur/instruction_executor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ class InstructionExecutor
4848
std::bind(&InstructionExecutor::trajDisconnectCallback, this, std::placeholders::_1));
4949
}
5050

51+
~InstructionExecutor()
52+
{
53+
driver_->registerTrajectoryDoneCallback(nullptr);
54+
driver_->registerTrajectoryInterfaceDisconnectedCallback(nullptr);
55+
}
56+
5157
/**
5258
* \brief Execute a sequence of motion primitives.
5359
*

0 commit comments

Comments
 (0)