5 Replies Latest reply on Aug 16, 2010 4:20 PM by ilya_k

    RSL unload question

    ilya_k

      Greetings!

       

      I heard that once RSLs are loaded they can not be unloaded.

      Correct me if I am wrong it is true for both Framework RSLs and custom RSLs.

       

      I have modular application which loads  module_A and unload it. Then it loads module_B and unload it, and so on.

      module_A linked dynamically with  custom RSL_A, module_B linked dynamically with custom RSL_B.

      Question: will the RSL_A remain in the Flash Player memory after module_A unloaded?

       

      Thanks,

      _Ilya

       

      Sorry, switching between different forums I accidentally asked this question in the wrong forum.

        • 1. Re: RSL unload question
          Darrell Loverin Level 4

          RSLs were designed to be loaded into the application domain of the application or module that links with them. That said, there was a bug in Flex 3 where a module could load an RSL into the top-level application's app domain. The bug is fixed in the latest version of 3.x and Flex 4.

           

          In the next release we want to allow developers control over which application domain an RSL is loaded into.

           

           

          -Darrell

          1 person found this helpful
          • 2. Re: RSL unload question
            ilya_k Level 1

            Thanks Darrell!

             

            This is good to know but let me give you more specific.

             

            I am using Flex SDK 3.3.0 and will continue using it for some time.

            Back to my question.

            1) RSL once they are loaded by application that links with them will remain in the Flash Player memory.

                Question: Is it correct?

             

            2) Main application loads in the child application domain sub-application A which links with RSL_A.

                Then main application unloads sub-application A.

                Question: will RSL_A remain in the Flash Player memory after sub-application A was unloaded?

             

            3) Main application loads module_B which lonks with RSL_B.

                Question: Is it true that while loading module_B, RSL_B will be loaded as well

                                  or RSL_B has been preloaded already in the first frame when main application was loaded?

             

             

            4) Main application unloads module_B.

                Question: will RSL_B remain in the Flash Player memory?

             

             

            Note, i am not taking about browser cache - my concern is Flash Player (i.s. browser) memory utilization.

             

             

            Thank you,

            _Ilya

            • 3. Re: RSL unload question
              Darrell Loverin Level 4

              First some background:

              RSLs get unloaded when the application domain they are loaded into gets unloaded. Flex 3.3 has the issue where if the main application loads RSLs, its sub-applications and modules will load its RSLs into the main application's application domain instead of their own. If the main application does not load RSLs, then sub-applications and modules will load RSLs into their own application domain.

               

              For Flex 3.3 the answers to your questions are:

               

              1. Yes.

              2. Yes.

              3. RSL_B will be loaded in the first frame of the module_B.

              4. Yes.

               

               

              -Darrell

              • 4. Re: RSL unload question
                Darrell Loverin Level 4

                My answers to the four questions above are assuming the main application loads at least one RSL. If not,

                then sub-applications and modules would load their RSLs into their own application domains

                and the RSLs would be be unloaded when the sub-application/module unloads.

                • 5. Re: RSL unload question
                  ilya_k Level 1

                  Thanks Darrell,

                   

                  I had marked the question as "answered" before you submitted this

                  "My answers to the four questions above are assuming the main application loads at least one RSL. If not,

                  then sub-applications and modules would load their RSLs into their own application domains

                  and the RSLs would be be unloaded when the sub-application/module unloads."

                  post. In fact th this post changed everything.

                   

                  So, if I understand this post correctly then in the scenario when

                   

                  • main application is not linked with RSL_A;
                  • but sub-application linked with RSL_A;
                  • and main application loads sub-application in the child application domain.

                  when main application loads sub-application then

                  • sub-application will load RSL_A into first frame;
                  • when main application will unload sub-application, RSL_A will be unloaded as well.

                   

                   

                  Thanks,

                  _Ilya