I've come across a major bug with TLF in Flash CS5 while trying to figure out why a friends SWF was leaking memory in a major way. I profiled his SWF and turns out TLF was the cause. After some quick tests, I narrowed down exactly how to replicate the issue, and it’s a fairly common use case. I'm not sure how this wasn't noticed before.
Set up- Create a TLF TextField in Flash Pro. Convert it to a Movieclip. Put the TLF-MC on your timeline but use empty frames so the MC is only on the timeline for part of the time, so when you run your SWF, you'll see the movieclip blinking. Run and then watch memory consumption go through the roof. While "blinking" isn't a common use case, its very common to have a movieclip that only exists for a short time, and then removed. It appears as if Flash Pro is creating TLF instances, and then not destroying them, and when the playhead comes back around, its creates another instance, and there's the leak.
I put an example SWF here with Hi-Res Stats graph so you can see the memory climb: http://dl.dropbox.com/u/189315/TLF_MemTest.swf
and zip file containing the Flash CS5 .fla here: http://dl.dropbox.com/u/189315/Flash_TLF_Mem_Leak.zip
I consider this a major bug. I've also posted this bug to the Adobe feature request/bug form since Flash Pro doesn’t' have a public bug base.
I can reproduce your bug in CS5, however the good news is that I do not reproduce it in an later internal build, so it appears as though it has been discovered and fixed at some point. I'll see if I can find out any more information regarding this. I'm sorry you ran into this - memory problems are never fun.
Thanks. I'm glad to know its fixed. Doesn't help currently, but good to know a fix is coming. Any chance a time frame is known for when the next update would be coming ( before end of 2010? Q1 2011?).
Been awhile, but I tried to produce the memory leak in Flash CS 5.5 and the leak is still there.
Test FLA (CS 5.5)
Perhaps in CS6?
I got the same problem, and the only solution i found is to add frams to all the TlfTextfiled layers, and make the TlfTextfiled exist in all the frames of the movie clip.
For example, if my movieClip has 2 frames, and the TlfTextfield has 1 frame only, the movie clip will not be removed from the memory.
If we will add an empty frame to the TlfTextField layer, it will not solve it.
If we will add a frame with exatcly same object of the TlfTextField to the layer (without changing properties such as alpha or color), it will solve it.
I did'nt want the TlfTextField will be shown in all the frames, so i added as3 code in the specific frame for hiding the TlfTextField (myTlf.visible = flase).
It is a dirty solution, but a solution