fix memory leak error with Page::renderImage()