The RMP Motion Controller API

◆ Delete()

virtual void Delete ( void  )
pure virtual

Delete the MotionController and all its objects.

Deletes the MotionController pointer and all the objects it created. This includes all of the first-class RapidCode objects (Axis, MultiAxis, IO, IOPoint, etc.). After a MotionController and all its objects have been deleted, you can use Create() again.

Every sinlge first-class object pointer will now be pointing to free'd memory. You will get access violation exceptions (or worse). We suggest setting the motioncontroller pointer to null after this is called.

ℹ This function is avaliable in RapidCode

Part of the Create and Initialize RapidCode Objects method group.

Sample Code:
// -- C++ -- //
MotionController *controller = MotionController::Create();
RapidCode object destructors are private. Delete() provides users a method to clean up all RapidCode objects. This method is required if you are planning to re-create the MotionController or to fully destroy (and free) all objects when you application closes.
See also
CreateFromSoftware, Create
ControllerInterrupts.cpp, HardwareLimits.cpp, Memory.cpp, MotionHoldReleasedBySoftwareAddress.cpp, MultiaxisMotion.cpp, PathMotion.cpp, PVTmotionMultiAxis.cpp, SingleAxisSyncOutputs.cpp, StreamingMotionBufferManagement.cpp, SyncInterrupt.cpp, SyncOutputWithMotion.cpp, Template.cpp, UpdateBufferPoints.cpp, and UserLimitDigitalInputAction.cpp.