[Celerity-users] memory leaks and serialize blockage

Jari Bakken jari.bakken at gmail.com
Thu Dec 10 14:39:02 EST 2009


On Thu, Dec 10, 2009 at 8:19 PM, jason franklin-stokes
<jasoninclass at googlemail.com> wrote:
> Jari,
>
> just thinking about without looking at the code again...
> click_and_attach is probably thowing away the old instance of the webclient while the javascipt thread is still running which means that it wont get garbage collected. closeallwindows needs to be called on the webclient instance to ensure that the javascript threads get terminated. I am just not sure what side effects that would have on the celerity code by calling close on the celerity browser instance before letting it go in click_and_attach.
>
> what do you think?
>

Nope, click_and_attach is not throwing away any old instances. Calling
Browser#close is the user's responsibility - Celerity can't know if
the user still wants to use the browser. Remember, this is how
click_and_attach is supposed to be used:

  b = Browser.new
  b.goto("http://...)

  popup_browser = b.button(:id, 'trigger-popup-window').click_and_attach
  popup_browser.text_field(:id, 'foo').set("foobar") # or whatever
  popup_browser.close

  b.button(:id, 'bar').click # or whatever - continues using the same browser

If you could just show some code that exemplifies the problem you're
having, I'm sure I'd be able to help.


More information about the Celerity-users mailing list