Wednesday, September 8, 2010

Re: Memory Leak IE7 & GWT 2.0.4

@ckendrick 

Thank u for ur reply about GWT, but i am passing trough some problems
with the destroy, today, my application has a AppController that handle
all the page switching, i have one interface that all presenters implements,
in this interface i put the current page, when i want to change the page, i fire
a event that goes to this AppController and change the object(Presenter) in 
that interface then calls go passing the main container and inside the go i change
the implementation of this container to the current view that i want to show...

The problem is, if i call destroy in this container before change him so the
new page can be displayed, the page doesn't appear, like that reference container
doesn't have any value anymore, but if i debug, i see that the container has an object,
but it doesn't appear.... i don't know what can i do anymore...

i really need some help because last less then one month for
the application starts working on the net and this problems persists.

Tnks for replys,




 
--
Marcos Paulo Damasceno
Desenvolvedor Java
http://devforfun.com/

Twitter: www.twitter.com/_marcospaulo_
Del.ici.ous:
www.delicious.com/marcospaulo_
MSN: 
marcospaulodamasceno@hotmail.com

------------------------------------------------------------------------------------------------------------------------
"Grandes resultados requerem grandes ambições."
(Heráclito)

"Se suas ações inspiram outros a sonhar mais, aprender mais, fazer mais, tornar-se mais, você é um líder."
(John Quincy Adam)

"Se tudo fosse perfeito, amanhã não poderia ser melhor"



2010/9/8 ckendrick <charles.kendrick@gmail.com>
Just one more note on this: in SmartGWT calling destroy() on a parent
automatically destroy()s all children recursively, all widgets that
generate children (eg ListGrids generate a header) automatically
destroy those children with themselves, and removed tabs automatically
destroy their panes unless you tell them not to.

The net result of this is that there's no need for a manual destroy()
call anywhere in the Showcase, or in most applications that use the
pattern of generating new tabs.  Further, in any situation where
you're trying to permanently get rid of a component, where you would
otherwise call something like layout.removeMember(member) you just
call member.destroy() instead (and this takes care of layout removal
as well).

Just wanted to clarify all this since there was speculation the
strategy would be "rife with problems" and "very hard for users to get
right".  It's understandable that experience with some previous
framework would make someone think so, but it's very easy in SmartGWT,
and we think an explicit destroy() is the right approach in terms of
giving us the opportunity to work around browser garbage collection
bugs.

On Sep 7, 7:22 pm, ckendrick <charles.kendr...@gmail.com> wrote:
> Just a note onSmartGWT-
>
> Built-in GWT widgets rely on the browser to garbage collect a detached
> DOM tree.  In older browsers like IE6/7 we found a number of cases
> where this didn't work completely, so we opted for manual destroy().
> It's possible that as of IE8/9 all such leaks are gone (personally I
> find this unlikely :), but, we're not really interested in finding
> out.
>
> And yes, we have tools that make leaks obvious - the Watch Tab in the
> Developer Console, which shows a tree of all components.  You tend to
> spot leaked components right away while using the tool for other
> purposes.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment