fix memory leak in viz3d