pothos-gui: also fix memory leak with painter