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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:22:26+00:00 2026-06-06T05:22:26+00:00

I think I might be causing a bug in my code because I’m unclear

  • 0

I think I might be causing a bug in my code because I’m unclear about what the cleanup: part of removeChild:cleanup: method of cocos2d ccnode class.

Thanks.

  • 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-06T05:22:27+00:00Added an answer on June 6, 2026 at 5:22 am

    It stops all actions and unschedules any scheduled selectors associated with the CCNode, basically removing any references that cocos could have to the object. It also propagates the cleanup invocation to all of the object’s children. If the object is an autorealease-able object and you did not retain a reference to it, the memory should be reclaimed by the objective-c runtime, for the object itself and its children. That would be true of almost all objects, but not if you added the objected as a targeted touch delegate. In that case, I would recommend to override the onExit method as this:

    - (void) onExit{
        [[CCTouchDispatcher sharedDispatcher] removeDelegate:self];
        [super onExit];
    }
    

    this way, the object will be fully release-able when you cleanup.

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

Sidebar

Related Questions

I think my code might be written incorrectly and this is causing my problem.
I have some PL/SQL code that I think might have a memory leak. Everytime
You might think that this question is already answered. However, I couldn't find the
I think it might have been asked before but i was unable to find
I think I might have done something right, headByRating and headByName both refer to
I think this might be a problem with the theme I'm using ( Nitobe
I think I might be overtired but I cannot for the life of me
I think I might be having a stack overflow problem or something similar in
Today I think i might have learned something (not sure), i'm not really a
I am new to Unit Testing and think I might have dug myself into

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.