KeepInTouch: Flash

Memory Management

Posted by: Sammy on: August 1, 2008

As I code the KIT:F, I have to keep in mind that the chumby has limited resources so I try to go easy on the transition animations as well as the number of variables, lines of code and limit loops. Of course this will be my secondary concern as first and foremost I will deliver a quality piece of software.

Since the KIT relies on a lot of reusable code/classes I have to be careful and get it right from the start. The KIT primarily have five screens with a lot of going back and forth between them. What I usually do is as soon as the user navigates away from a screen i severe the top most link (parent) and let the garbage collecter clear the memory. I have done a few runs and notice that the memory usage keeps increasing the longer I run the program. I might give council a call and complain.

So for now I have three solutions I will try. The first is that I will not only severe the parent association but I will do the same for every child. Secondly I notice that every time it goes from screen to screen there is a new instantiation, I will re-use the object,  this will hopefully cut down on memory usage. This will mean I have to change how the classes work. And lastly… I can’t remember what the last solution is. I write this so I don’t forget my ideas when I get absorbed into the technicalities of coding but I can’t even remember three things during this post! </rant>

When I do remember I’ll append to this but for now I’ll start going through and applying these changes.

Leave a Reply

 

August 2008
M T W T F S S
« Jul   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

Blog Stats

  • 252 hits