that in MVP it's like go to another page... How do i have sure? because give a id for a component then
i go to page twice and in the second time, an error ocurred telling me that the it could not create another
component with the same id, so the old one, even if it is not showing, still exist there....
The solution?? call destroy from component.. but... it happens what i told in my last e-mail...
My memory leak happens in all browsers, IE 8, Firefox 3.6 and Safari 4...
I am using SmartGwt....
If someone could please give a hint to solve this problems, i would apriciate...
tnks
--
Marcos Paulo DamascenoDesenvolvedor Java
(85) 8140-0111
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"
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/8/27 Joel Webber <jgw@google.com>
Hmm... I've tried to reproduce this on IE7 and IE8 (both quirks &
standards), to no avail. I doubt it's anything in the outer HTML file,
but just in case, here's what I used:
<!DOCTYPE HTML>
<html>
<head>
<title>Hello</title>
<script type="text/javascript" language="javascript" src="hello/
hello.nocache.js"></script>
</head>
<body>
<div id='container'></div>
</body>
</html>
The initial calls to getSomeText() were causing a huge number of slow-
script warnings on IE, so I was only able to run through a few
iterations. I then dropped the count by a factor of 10 to get the SSWs
under control, and the memory usage appears quite stable after a
couple of hundred clicks. (~30MB). Can you think of anything else that
might be different in your setup?
On 27 août, 08:20, chrisr <chris.robert.rowl...@gmail.com> wrote:
> Sorry for posting this twice. If a moderator wants to/can remove the
> duplicate go ahead.
>
> On Aug 25, 2:56 pm, chrisr <chris.robert.rowl...@gmail.com> wrote:
>
>
>
> > I created a simple application in an attempt to reproduce a memory
> > leak issue in our decently large GWT application.
>
> > This test application basically contains a split panel with a button
> > on the left, and a tab panel full of large blocks of text on the
> > right.
> > Clicking the reload button fires the reloadRight method, and does a
> > panel.clear() to remove the old tab panel and a panel.add() to add a
> > new tab panel to the right panel. Doing this repeatedly causes memory
> > consumption to increase without bounds.
>
> > For example, on the initial load IE7 uses around 35 MB. 125 clicks
> > later its using nearly 1.5GB.
>
> > Is this example doing something in a fundamentally incorrect way?
> > How can I keep memory usage from exploding like this?
>
> > /* Example Below */
>
> > package com.example.myproject.client;
>
> > import com.google.gwt.core.client.EntryPoint;
> > import com.google.gwt.event.dom.client.ClickEvent;
> > import com.google.gwt.event.dom.client.ClickHandler;
> > import com.google.gwt.user.client.ui.Button;
> > import com.google.gwt.user.client.ui.DecoratedTabPanel;
> > import com.google.gwt.user.client.ui.DecoratorPanel;
> > import com.google.gwt.user.client.ui.HTML;
> > import com.google.gwt.user.client.ui.HTMLPanel;
> > import com.google.gwt.user.client.ui.HorizontalSplitPanel;
> > import com.google.gwt.user.client.ui.RootPanel;
>
> > /**
> > * Entry point classes define <code>onModuleLoad()</code>.
> > */
> > public class TestApplication01 implements EntryPoint {
>
> > /**
> > * This is the entry point method.
> > */
> > public void onModuleLoad() {
> > RootPanel.get("container").add( new MainPanel() );
> > }
>
> > private class MainPanel extends DecoratorPanel{
>
> > private HorizontalSplitPanel hsp;
> > private HTMLPanel lPanel;
> > private HTMLPanel rPanel;
> > private DecoratedTabPanel tabPanel;
> > int rightPanelCount = 0;
>
> > public MainPanel(){
> > hsp = new HorizontalSplitPanel();
> > hsp.setSplitPosition("25%");
> > hsp.setSize("800px", "400px");
> > lPanel = new HTMLPanel("<div id=\"reloadButton\"/>");
>
> > rPanel = new HTMLPanel("<div id=\"right-panel-contents\"/>");
> > Button reloadButton = new ReloadButton(this);
> > reloadButton.setVisible(true);
> > lPanel.add( reloadButton, "reloadButton" );
> > hsp.setLeftWidget(lPanel);
> > hsp.setRightWidget(rPanel);
> > this.add( hsp );
> > reloadRight();
> > }
>
> > char[] chars = new char[] {' ',' ',' ', ' ', ' ',
> > 'a','b','c','d','e','f','g','h','i','j','k','l','m',
> > 'n','o','p','q','r','s','t','u','v','w','x','y','z' };
>
> > private String getSomeText(int length){
> > StringBuffer sb = new StringBuffer(length);
> > for ( int i=0; i<length; ++i ){
>
> > sb.append( chars[ (int)Math.round(Math.random()*(chars.length-1)) ]);
> > if ( i>0 && i % 60 == 0 )
> > sb.append("<br>");
> > }
> > return sb.toString();
> > }
>
> > protected void reloadRight(){
> > ++rightPanelCount;
> > rPanel.clear();
>
> > tabPanel = new DecoratedTabPanel();
> > tabPanel.setWidth("400px");
> > tabPanel.setAnimationEnabled(true);
>
> > String text = "Load count = "+rightPanelCount;
>
> > tabPanel.add( new HTML(text+"<br>"+getSomeText((int)
> > (Math.random()*500)+500000)), "Tab One");
> > tabPanel.add( new HTML(text+"<br>"+getSomeText((int)
> > (Math.random()*500)+500000)), "Tab Two");
> > tabPanel.add( new HTML(text+"<br>"+getSomeText((int)
> > (Math.random()*500)+500000)), "Tab Three");
> > tabPanel.add( new HTML(text+"<br>"+getSomeText((int)
> > (Math.random()*500)+500000)), "Tab Four");
> > tabPanel.add( new HTML(text+"<br>"+getSomeText((int)
> > (Math.random()*500)+500000)), "Tab Five");
> > tabPanel.selectTab(0);
>
> > rPanel.add( tabPanel, "right-panel-contents" );
> > }
>
> > private class ReloadButton extends Button{
>
> > private MainPanel mainPanel;
>
> > public ReloadButton(MainPanel p){
> > super("Reload Right Panel");
> > this.mainPanel = p;
> > this.addClickHandler(getClickHandler());
> > }
>
> > private ClickHandler getClickHandler(){
> > return new ClickHandler(){
>
> > @Override
> > public void onClick(ClickEvent event) {
> > mainPanel.reloadRight();
> > }
> > };
> > }
> > }
> > }
>
> > }
--
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