After the discovery of #286, we should add a unit test that verifies that cloning and planning operations do not leak OpenRAVE environments. This would be something to the effect of:
import openravepy
robot.PlanToConfiguration(robot.GetActiveDOFValues(), execute=True)
initial_num_envs = len(openravepy.RaveGetEnvironments())
for i in range(10):
robot.PlanToConfiguration(robot.GetActiveDOFValues(), execute=True)
assertEqual(initial_num_envs, openravepy.RaveGetEnvironments())
I am not sure exactly how to do this test in prpy directly (without herbpy or similar).