5 Replies Latest reply on Jul 2, 2010 1:43 PM by Flex harUI

    MXML binding creating activation-object which seems to be memory leak

    Green Goby

      We are profiling our application trying to cut down some memory leaks and I have some loitering objects that are puzzling me.  I have searched on the internet and have seen others with similar issues, but thought I'd post here to see if I am on the right track and if anything can be done about it.  In our _bindingsSetup method that is generated from the MXML:

       

          private function _ManageFavoritesDialogBulb_bindingsSetup():Array

       

          {

       

              var result:Array = [];

       

              var binding:Binding;

       

       

       

              binding = new mx.binding.Binding(this,

       

                  function():Class

       

                  {

       

                      return (ManageFavoritesDialogView);

       

                  },

       

                  function(_sourceFunctionReturnValue:Class):void

       

                  {

       

       

       

                      _ManageFavoritesDialogBulb_View1.className = _sourceFunctionReturnValue;

       

                  },

       

                  "_ManageFavoritesDialogBulb_View1.className");

       

              result[0] = binding;

       

              // ... more bindings

      }

       

       

      While profiling the app, we have a more than a handful of GC roots that say result and binding are activation objects that are causing a whole bunch of stuff to be held onto.  Is this accurate?  If so, is there anything we can do about it other than not using MXML?

       

      Irv