He Joel,

Just a tinny problem I am still stuck with:
In your example above, the replaced content, contains a few more
RootPanels like this:
...>
  <div id='stuff'>
    <... stuff ...>
     <div id='rootPanela'>
      ....
     <div id='rootPanelb'>
  </div>
<...>

What I do: replacing the content of id="stuff" with some HTML widget
when the user presses a button, like you describe above. When the user
clicks another button, I put back the original content.
However, the original content contains some html snippets that are
loaded with a RootPanel (for example to add some Form).
If the user clicks a button such that the original content is
replaced, such that the RootPanels are put aside and not attached to
the body, the new code (I think it's even your code ;)) in RootPanel:
detachWidgets will throw an Assert exception when the hosted browser
is refreshed at that moment, as these Rootpanels aren't attached to
the Body and the RootPanel will try to remove it when the window
closes.

Any idea how to solve this?
I could remove these RootPanels from the widgetsToDetach in the
RootPanel when they are put aside, but I don't know the exact
RootPanel beforehand and I don't like this solution as it avoids my
code from being losely coupled...

Is this exception realy a possible memory leak? And might it not a bit
too tight (the exception)



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to