Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought

Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Getting Started / Avoiding Memory Leaks? on: December 22, 2010, 01:38:19
I have an AIR application that is comprised of four different views. The Stage Mediator has a timer that fires the 'animate in' and 'animate out' functions of each. The model is comprised of some unique and some shared data. For example, the first state of the application displays the visitors checked into a facility. This checked-in visitor info is necessary for all other views.

Currently, the application has several leaks. It starts with a memory consumption of 70K which builds to 500K after an hour. Here are some methods that I think might be causing the leaks:

  • In mediators and proxies that depend on shared information, I am instantiating the proxy that populates the appropriate VO. Can I create some kind of global application-wide variables without having to do this?
  • How does facade.retrieveProxy work with regards to memory?
  • I'm not sure what the best practice is for garbage collection and PureMVC. The proxies pull data from the web and a database, so each time they cycle in, they need to have updated information. I was going to set the data and views to null after each 'animate out,' but maybe there's a better way?

Sorry if these questions are hard to understand. If not specific to my issues, I'd still like to hear some of the best practices for avoiding memory leaks with PureMVC.  Thanks!
Pages: [1]