• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
2

AS3 TextField and TextFormat memory leak “other bitmap memory”

Community Beginner ,
Apr 25, 2014 Apr 25, 2014

Copy link to clipboard

Copied

I've run into a memory leak problem during programming AS3.

I try to format a text in as3 and adding it to the stage, but there happens something crazy.

This is a part of my code:

var format:TextFormat = new TextFormat();
        format
.size = 60;

       
var t:TextField = new TextField();
        t
.autoSize = TextFieldAutoSize.LEFT;
        t
.text = "WWWWWWWWWWWWWWWW";
        t
.setTextFormat(format);
        t
.scaleX = 1;
        t
.scaleY = 1;

       
this.addChild(t);

The moment I add this textfield to my stage and check the memory usage with adobe scout CC the "other bitmap memory" shows nothing weird and acts just fine.

BUT...

When I run this code and add a capital W to the text the "other bitmap memory" goes crazy.

The crazy thing is when I add a letter I to the text it just runs normal.

I think it has something to do with the width or the size of the font. Increasing the font size will give the same problems.

Does anyone now how to prevent this problem???

Im working with adobe flash builder 4.7 and adobe scout cc.

Views

855

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 30, 2014 Apr 30, 2014

Copy link to clipboard

Copied

I fixed it using embedded fonts, but its a weird memory leakage

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 09, 2014 Jul 09, 2014

Copy link to clipboard

Copied

LATEST

We experienced the same issue in our iOS Flex application. We have a lot of item renderers with labels. Each data updates added 1-5MB to "Other Bitmap Memory" in Scout.

But with you fix memory is constant now.

Stan

Flex 4.12.0 Air 4.0

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines