BUG: Fix TubeRigidMetric memory leaks.