OOM Error in Supporting Multiple Windows/Tabs

I need to support multiple window/tabs to open different sessions for the given application. I am using single app - multiple window model to implement it using following suggestion: http://vaadin.com/web/joonas/wiki/-/wiki/Main/Supporting+Multible+Tabs

When I open first window (main window) the application works fine. But when I open second tab the getWindow() method is called and I verified that it returns correct window (with new name given) but after that browser waits for some time and then I see following OOM error

Aug 23, 2011 4:25:00 PM com.vaadin.Application terminalError
SEVERE: Terminal error:
java.lang.OutOfMemoryError: Java heap space

Since its not really giving much information and there is not seem to be problem in my code (because the app works fine if I open multiple windows using different browsers).

Can anybody give some ideas what is going on here?


I also noticed that the the problematic code is
w.open(new ExternalResource(w.getURL()));

This causes the flickering in the browser as well as looks like creates the new instance of window object because all member variables on this second instance (after flicker) are null.

Can I avoid calling this open API and still change the URI to change to new URL to be remembered for future?