Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 729103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:45:31+00:00 2026-05-14T06:45:31+00:00

I have been building a game for a while (nearly done) – But the

  • 0

I have been building a game for a while (nearly done) – But the game needs a replay button and its a big task.

I know the GC is dreadful in flash, but I wanted to know if there is a way to wipe EVERYTHING as if the flash app has just begun. Clearing memory, game data – I haven’t to worry about game loading as its not really heavy on data.

Everything pretty much lives in a DataModel – but I fear if I just clear the all variables, I’ll have pockets of orphaned memory.

Any forwarding idea would be great.

cheers guys.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:45:31+00:00Added an answer on May 14, 2026 at 6:45 am

    I would do this:

    1. make a class that encapsulates your entire game, called GameContainer or whatever.
    2. Do a search on all your source code, and make sure that in every call to addEventListener, you are passing true for the “use weak references” argument.
    3. In your document class (or frame script), make a single instance of GameContainer and add it to the stage, and do nothing else.

    Now when you want to entirely clear your game from memory, remove GameContainer from the stage and null the reference. Memory will not immediately be released, but everything in your game will now be eligible for release. If Flash thinks it needs more memory it will trigger a GC, and the large orphaned GameContainer will be nuked. (Step 2 above will keep your event listeners from counting as references to your objects, and make sure that all self-contained objects are eligible for disposal.

    Not sure what you mean about Flash’s GC being dreadful though. I can’t recall having heard of any bugs in it. It won’t nuke your objects unless you are careful with your references, but that’s true of all garbage collection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been building IMO a really cool RIA. But its now close to
I have been building a large python program for a while, and would like
I have a fairly simple board game i've been building in C++. Currently, players
I have been building this app for a while now and have not had
I have been building enterprise software for the last 10 years. In this time
I have been building a new application using my current understanding of domain driven
I want to bounce an idea around. I have been building web services and
I have been investigating building web parts for sharepoint 2010 and currently have a
I have been involved in building a custum QGIS application in which live data
I have been using PHP and JavaScript for building my dad's website. He wants

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.