1 Reply Latest reply on May 18, 2010 2:22 PM by GordonSmith

    Unused functions

    SpaghettiCoder Level 3

      Just wondering

       

      Do comments compiled into the final swf?

       

      Do unused functions get compiled into the final swf?

       

      Do unused variables get compiled into the final swf?

        • 1. Re: Unused functions
          GordonSmith Level 4

          > Do comments compiled into the final swf?

           

          No.

           

          > Do unused functions get compiled into the final swf?

           

          Yes, if you're talking about function in classes. If the class gets linked in, then all of its functions come along, even if they never actually get called. (It's possible this might change in the future.) There are also package-level functions. these only get linked in if you use them.

           

          > Do unused variables get compiled into the final swf?

           

          Class-level and package-level variables are similar to class-level and package-level functions. I'm pretty sure that unused variables inside functions also get compiled, but in the future they might get optimized out.

           

          Gordon Smith

          Adobe Flex SDK Team