2 Replies Latest reply on Jan 24, 2012 6:00 AM by dinko_ivanov

    ¿SpellUI memory leak?

    AntuanSoft Level 1

      Hi! everybody.


      We are trying to integrate de SpellUI component in our Flex application and we have a problem when we remove the view where de SpellUI is applied.


      We have a test application to profile the memory with a main view that load a component with a textarea where the SpellUI is applied.


      The main view can add a child with the component and can remove it. We have a enableSpelling button to enable the word checking and if the spelling is active, the main view can´t remove the componet it is still in memory and it can´t be removed.


      ¿Are there any way in order to remove the static reference of the SpellUI in the textarea where it is applied?, i think that it is the problem why the component can´t be removed of the memory.


      The code: Compiled with Flex 4.0 (Sorry the main app is in a mx and the Component is spark but its works)




      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">





           import mx.collections.ArrayCollection;

           import mx.core.UIComponent;


           private var texts:ArrayCollection = new ArrayCollection();


           private function addDictionary():void{


                var text:UIComponent = new TextAreaTest();

                text.left = 10;

                text.top = 40;






           private function deleteDictionary():void{


                for (var i:int = 0; i< texts.length;i++){

                     var text:UIComponent = texts[i];












      <mx:Button label="remove" x="235" y="10" click="deleteDictionary()"/>

      <mx:Button label="add" x="153" y="10" click="addDictionary()"/>







      <?xml version="1.0" encoding="utf-8"?>

      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"


      xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">


      <!-- Place non-visual elements (e.g., services, value objects) here -->





           import com.adobe.linguistics.spelling.SpellUI;


           private function enableFeature():void {

                SpellUI.enableSpelling(textArea, "en_US");


           private function disableFeature() :void {










      <mx:TextArea id="textArea" width="20%" height="20%" fontSize="30" text="Spell cheecking in TextArea " top="10" left="50"/>

      <mx:Button id="tt1" label="disable Feature" click="disableFeature()" left="200" top="160"/>

      <mx:Button id="tt2" label="enable Feature" click="enableFeature()" left="60" top="160"/>




        • 1. Re: ¿SpellUI memory leak?
          AntuanSoft Level 1

          ¿Nobody are worry about memory leaks? or my english is so bad and i explained the problem very bad. .


          I only want to confirm with Squiggly developers that this memory leak exists or i´m doing something wrong when the static function SpellUI.enableSpelling is used. do you need more info? ask me please.


          I probed with others parts of the Squgglly framework like the TextEditor Example where SpellChecker and HunspellDictionary are created and there is no memory leak, every thing are destroyed properly.



          • 2. Re: ¿SpellUI memory leak?



            We also observe the memory leak. The problem does not seem to occur when SpellUI for MX TextArea (AdobeSpellingUI.swc) is used, but when we use SpellUI for Spark TextArea (AdobeSpellingUIEx.swc).


            We are enabling the spelling for a text area on ADDED_TO_STAGE and disabling the spelling on REMOVED_FROM_STAGE. We do this in a test AIR application for 100 Spark text fiedls. The memory footprint after removal of the text areas is around 22 MB.


            Any help is appreciated.


            Best Regards,

            Dinko Ivanov