Skip navigation
Currently Being Moderated

Major memory leak with TLF + Flash Pro CS5

Nov 10, 2010 7:58 AM

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.

 

 

timeline.png

 

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.

 
Replies
  • Currently Being Moderated
    Nov 10, 2010 10:38 AM   in reply to John J Olson

    Hi there,

     

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 10, 2010 11:26 AM   in reply to John J Olson

    Hi,

     

    Unfortunately I don't know (and couldn't say if I did...), but watch those blogs and announcements

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2012 12:21 PM   in reply to John J Olson

    i notice the same bug in flash CS6 pro !

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 15, 2012 12:23 PM   in reply to jdehaan

    I have the same trouble. I need to use many tlftextfield for a application. Is it a fix ?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 13, 2012 3:50 AM   in reply to Laurent Alhadef

    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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points