RobotStudio event

How do you dynamically change the length of a cylinder body?

Hi,
I'm trying to animate how a robot behaves when a rod is increased or decreased in length.
My solution is to have a Part that contains a Body. When the Part is to change size, I clear all the bodies from the Part and then create a new Body that is to be inserted into the Part object.
However, whenever I create a new Body, the old Body that should be cleared is for some reason still in memory and I get a memory leak. 
Is there a way to remove a Body from memory that is no longer used, as the garbage collector does not take care of this. Or is there an other solution to change the parameters of an existing Body?

in best regards
August