Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Usage



I started a discussion in december 2006 about a possible memory leak when using XMLHttpRequest. I also filed a bug at bugreporter.apple.com but I haven't heard anything since :-(

Widgets don't automatically go into idle mode when Dashboard is hidden/sent to the background. You have to implement it in your widgets (and it really isn't an issue unless your widget contains a loop that is called over and over again).

You could do something like this:

var dashboardVisible = true;

widget. (){
   dashboardVisible = true;
   loop();
}

widget.>   dashboardVisible = false;
}

function loop(){
  if(dashboardVisible){
    // do what you normally do
    loop();
  } else {
    // dont do anything
  }
}

That would prevent the widget from running when Dashboard is in the background. It won't help you with the memory usage though but at least the widget doesn't grow in memory when it's not used.

Gustav

2007/1/8, Johnny Storm <email@hidden>:
Previously there was a discussion on Widget memory usage, I was
curious if that ever got resolved.

I noticed that my widget's memory usage has been increasing
exponentially even when the Dashboard is in the background.

When the Dashboard is in the background is it technically idle?

Thanks

-js
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      ( email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

References: 
 >Memory Usage (From: "Johnny Storm" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.