Attaching and unattaching joints

We have an actor which needs to attach itself to polygons (platforms) and later unattach itself. We use the following code to attach the actor to a platform.

Code:
RevoluteJointDef = new b2RevoluteJointDef();
RevoluteJointDef->Initialize(Body, platformAttach->Body, b2Vec2(center.x * SCALE, center.y * SCALE));
RevoluteJointDef->collideConnected = false;
RevoluteJointDef->maxMotorTorque = 50.0f;
RevoluteJointDef->motorSpeed = 0.0f;
RevoluteJointDef->enableMotor = true;
Joint = g_world->CreateJoint(RevoluteJointDef);


How do I now unattach this joint? Then how to I re-attach it later?
This is how I'm detaching the joint.. good enough I guess

Code:
if(Joint != NULL)
   g_world->DestroyJoint(Joint);

if(RevoluteJointDef != NULL)
{
   delete RevoluteJointDef;
   RevoluteJointDef = NULL;
}

Joint = NULL;

Original thread: https://box2d.org/forum/viewtopic.php?t=4667