Switch to mx:TextInputs and/or TextField and see if the problem persists.
It could be that TLF sets up the flash.text.engine classes in a way that
references are kept to TextLines and/or their containers.

-Alex

On 11/2/13 8:53 AM, "After24" <vinc...@after24.net> wrote:

>The main app contains the TextInput to wich I give focus before
>unloading the module. I replaced it with a button but it changes nothing.
>
>I tried the pure actionScript version with a textflow. I added to the
>flowComposer a ContainerController based on a sprite. Unfortunatly, the
>module is not garbage collected.
>
>Le 02/11/13 16:20, Alex Harui a écrit :
>> Are there Spark Text controls in the main app?  If so, there could be
>>some
>> static vars in TLF that hang onto the control in the module.
>>
>> On 11/2/13 8:05 AM, "After24" <vinc...@after24.net> wrote:
>>
>>> Hi Alex,
>>>
>>> Thank you very much.
>>> It's a spark TextInput.
>>>
>>> I will continue to investigate.
>>>
>>>
>>> Le 02/11/13 15:35, Alex Harui a écrit :
>>>> Is this mx TextInput or Spark?  Spark might be managing some undo
>>>>stack
>>>> or
>>>> something like that.
>>>>
>>>> A good test is to build an AS-only equivalent and see if there is
>>>>still
>>>> a
>>>> problem.
>>>>
>>>> -Alex
>>>>
>>>> On 11/2/13 4:11 AM, "After24" <vinc...@after24.net> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I found out that the memory leak is caused by the focus manager.
>>>>>
>>>>> So concerning the warning about the module calling
>>>>> net.registerClassAlias()
>>>>> -> the module is garbage collected even when those warnings pops up
>>>>>in
>>>>> the
>>>>> console.
>>>>>
>>>>> Now I'm stuck with the focus manager causing a memory leak :
>>>>>
>>>>> After reading some blog posts about the correct way to handle module
>>>>> unloading (From Alex Harui ,Tom Sugden) I added a textInput in the
>>>>> shell
>>>>> application to which I give focus just before module unloading :
>>>>> Now if a module button is clicked or if  the focus is given to a
>>>>> textinput
>>>>> without typing anything, the module instance disappears when the run
>>>>> Garbage
>>>>> collector button is pressed but if some text is typed in a textInput
>>>>> the
>>>>> module stays in memory.
>>>>> I used the debugger to see if the focusManager instance keeps a
>>>>> reference
>>>>> to
>>>>> a module control but I don't found anything.
>>>>>
>>>>> Any idea ?
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> 
>>>>>http://apache-flex-users.2333346.n4.nabble.com/Memory-leaks-management
>>>>>-i
>>>>> n-
>>>>> modules-tp3422p3482.html
>>>>> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>>
>

Reply via email to