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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:25:14+00:00 2026-06-04T14:25:14+00:00

I have a Cocos2d scene (CCLayer) with a CCMenu. I implement the dealloc as

  • 0

I have a Cocos2d scene (CCLayer) with a CCMenu. I implement the dealloc as

- (void) dealloc {
    [menu release];
    menu = nil;

    [super dealloc];
}

when i use shared director to replace the scene with an other, it load the second scene and then program crash in dealloc, especially in

[super dealloc]; //Thread1: Program received signal: "EXC_BAD_ACCESS".

The call to replace the scene is

[[CCDirector sharedDirector] replaceScene:
     [CCTransitionFade transitionWithDuration:0.5f scene:[SomeOtherScene scene]]];

Why is this happens? Should i call [super dealloc] or not?

  • 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-04T14:25:16+00:00Added an answer on June 4, 2026 at 2:25 pm

    I think you need to set menu to nil THEN release it, that may be your issue. And to answer your second question yes you definitely should call [super dealloc] or it could cause more issues.

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

Sidebar

Related Questions

I have a cocos2d game with a CCLayer called GameplayLayer placed inside a scene.
i am having this problem try to use the cocos2d CCScrollLayer I have added
i have 2 void functions(trying to implement radio button), i want them to send
I have a hierarchy like this: Scene  - gameWorld (CCLayer Z:0)     - player (CCSprite
I have to restart a scene created in cocos2d using a defined UIViewController. How
Hi guys I am new to the cocos2D.In my game i have one scene
I have a class called GameScene, with is a subclass of a cocos2d Scene.
Currently I have this code in my UIViewController: //Cocos2D methods -(id) init { if((self=[super
I have a Cocos2d game scene that loads with an EAGLView loaded by a
I have a cocos2d project with some scenes (home scene, level selection scene, game

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.