fix memory leaks in ExampleHists