Closed frank-weindel closed 8 years ago
Since phridge is holding a reference to the page object itself, you should not call page.close()
for yourself without notifying phridge. The page
object provided by phridge has a dispose()
method. Just call this, and phridge will internally call page.close()
and remove all references.
Did this resolve your problem?
In my application I'm calling
page.close()
within phantom manually when I'm done with a page. When I'm done with the phantom instance I call phridge'sphantom.dispose()
but I get the following error when I do this after the call topage.close()
.If I remove the call to
page.close()
this does not happen. I'm calling it because the phantom instance is reused many times and I want to clear out any resources being used before creating a new page using phridge'sphantom.createPage()
.Seems like phridge has no way to tell if a page it has created has been closed from within phantom. So when
phantom.dispose
is called its trying to close pages which are already closed.