• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

Avoid memory leakage

Hi,

I would like to know the measures to be taken to avoid memory leakage use as far as  less memory for our application.
I am developing air application so memory management is very important factor..
As per my knowledge to avoid memory leakage ...
1. Remove event listeners when not needed
2. Nullify the objects i.e variables etc in order to clean objects...
3. Avoid using array collection...

Is there any other factors to be taken care of...
Let me know so that the air application does not crash...

Also i have plans to store data(might be huge amt of data which grows periodically and accessible only through my application) in user PC..so any special measures to be taken


0
SreeramojuPradeep
Asked:
SreeramojuPradeep
1 Solution
 
ChristoferDutzCommented:
From my experiance here some more:

4. In List/Tree-Based controls: Recycle wherever you can (If you use the itemRendererFunction property for example one item renderer instance is created for each item, If you use the itemRenderer property then flex/air creates and reuses only a few objects)
5. Reuse data wherever you can. If you have a user list in several places of your application try to load the list only once instead of for each list.

If you are really having problems, I'd suggest to utilize the Flash Builder Pro Memory Profiler (Think it's the only one available).
0
 
dgofmanCommented:
In Flash Player 10 I don't see problem with memory leakage.
But always good practice to remove event listener(s) if not need it.
0

Featured Post

When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now