mask manager : add a way to cleanup unused shapes