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

Repurcussions on adding audio to the timeline in an MC for a game?

Explorer ,
Sep 22, 2021 Sep 22, 2021

Copy link to clipboard

Copied

Hey there. I just wanted to know if anyone has some ideas on performance / memory usage if audio clips are added to the timeline as events, instead of using code to play them back?

 

If a timeline is full of sounds being played back, is there anything special i need to do for garbage collection? Are they sitting in memory before they are played because the entire MC is on the stage? Do they prevent an MC from being garbage collected once it's removed from the stage?

 

I hope i'm being clear enough, not sure how else to ask this.

Thanks!

TOPICS
Performance

Views

66

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 Expert ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

LATEST

removing an object from the display list does not ready it for gc.  it must be removed and all references removed.

 

eg, for any referenceable display object (with only one reference), with our without, sounds, video etc, :

 

 

if(dobj.stage){

dobj.parent.removeChild(dobj);

}

dobj = null;

 

will ready the object for gc

 

}

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