Using the Linux command top
I see there are no processes named, "chrome".
Then I do:
library("chromote")
b <- ChromoteSession$new()
and see eight processes called chrome.
Now I close the window/tab:
b$close()
# [1] TRUE
but the eight processes remain.
I think I want to shutdown the browser process. I tried:
b$parent$close()
But this results in the error:
# Error in self$send_command(msg, callback = callback_, error = error_, :
# Chromote object is closed.
How do I properly close a Chromote session, created by ChromoteSession$new() so that there are no chrome processes using up memory?
Trying @margusl's solution:
b <- ChromoteSession$new()
# close session
p <- b$parent
p_browser <- b$parent$get_browser()
p_browser$close()
removes all chrome processes but has this error message. Is this a concern?
[1] TRUE
[2023-01-22 18:33:15] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
Same behaviour in Windows, though
Browser$close()
apparently kills chrome processes. Getter for browser instance isb$parent$get_browser()
.Created on 2023-01-22 with reprex v2.0.2