An object that is declared static goes on
the class object instead of on the instance object. In general there is only
one copy of the class object in memory so a variable declared there will save
you some space. So if you are talking about things like constants a static
variable is a good thing to use. A function on the other hand generally does
not take so much memory that you get a lot of benefit out of it being static. So
if the function is truly a utility, fine, make it static, but don’t try
to go optimizing code by changing functions on a class into statics, you won’t
see much benefit. Matt From: Can anybody please explain me how the static keyword works in Flex. As YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Doubts about static keyword Matt Chotin
- Re: [flexcoders] Doubts about static keyword Aldo Bucchi