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 8290209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:43:57+00:00 2026-06-08T12:43:57+00:00

i found a problem in my app: a have to scenes S1 and S2

  • 0

i found a problem in my app:
a have to scenes S1 and S2 and manager M; from S1 i can build and switch to S2 and from S2 can get S1 (all through manager).

Each time when i switch between scenes i want to delete one of it.

But i found that if i switch between scenes both scenes store in memory and after many switches app is crashed.

some pseudocode:

Manager:

    void build(Scene s){
    getEngine().setScene(s);
    }

    onLoadScene{
    M.build(S1);
    }

S1:

    onButtonClick{
    M.build(S2);
    }

S2:

    onButtonClick{
    M.build(S1);
    }

As i think when i build S1 link to S2 is dissapeared and
when build S2, S1 dissapeard and GC have to clean it if memory is not enough.

How can i avoid crashes of application?

Thx a lot.

  • 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-06-08T12:43:59+00:00Added an answer on June 8, 2026 at 12:43 pm

    That’s not enough code to help you find a memory leak. But my guess is your textures are getting recreated, and your sprites remain attached to the scenes. You want to pool and re-use your resources. Check for every time you are calling “new” anything, or creating a textureAtlas. In those cases make some sort of class that stores the old instances and reinitializes them. Andengine can be very sticky with resources unless you can specifically remove each one and all fo its references and dependencies.
    However in most games there is a limit on the number of bullets, enemies, bg tiles, etc that you need. So its possible to set up pools for each object type and recycle them. Waht you DONT want to do is make new assets each time you cal build().

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

Sidebar

Related Questions

We have encountered a very strange class not found problem in our web app
Seem to run into a service endpoint not found problem when trying to get
I'am currently working on GWTs Activity-Place implementation. Now I have found problem with the
Possible Duplicate: Can main function call itself in C++? I found this problem very
I have two branches: trunk, production. I have found a problem in trunk, made
my problem : the app I have uploaded into my cellular device is shown
I am exploring android and developement and I found one problem. My app UI
Before the users can use my app the have to login. My idea was
So here I believe I have a small buffer overflow problem I found when
I have a strange problem in my Core Data app. I have three entities

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.