How to debug CPU usage very high issue when switch between different scenes (in simulator)?

I have two scenes, A scene and B scene, both of them are containing some widgets, display components, native components.

All tests are in simulator (Mac OSX)

* If I just switch between A and B one time, the CPU usage is fine (around 17%)

* If I switch between A and B many many times then, the CPU usage is very high (> 80%), and it did not change lower, otherwise I kill the program manually

So,

* I am not sure how to debug the CPU usage issue.

* anything I need to take care if I switch between different scenes? for example, some resources I have to release?

After read the pinned post of “[Guide] Finding/Solving Memory Leaks”, and fix all possible memory leak related codes, the high CPU usage issue is also resolved by myself.

So, my conclusion, the pinned post of “[Guide] Finding/Solving Memory Leaks” is GREAT and very IMPORTANT, you should take time to digest it.

I have two scenes, A scene and B scene, both of them are containing some widgets, display components, native components.

All tests are in simulator (Mac OSX)

* If I just switch between A and B one time, the CPU usage is fine (around 17%)

* If I switch between A and B many many times then, the CPU usage is very high (> 80%), and it did not change lower, otherwise I kill the program manually

So,

* I am not sure how to debug the CPU usage issue.

* anything I need to take care if I switch between different scenes? for example, some resources I have to release?

After read the pinned post of “[Guide] Finding/Solving Memory Leaks”, and fix all possible memory leak related codes, the high CPU usage issue is also resolved by myself.

So, my conclusion, the pinned post of “[Guide] Finding/Solving Memory Leaks” is GREAT and very IMPORTANT, you should take time to digest it.

I have two scenes, A scene and B scene, both of them are containing some widgets, display components, native components.

All tests are in simulator (Mac OSX)

* If I just switch between A and B one time, the CPU usage is fine (around 17%)

* If I switch between A and B many many times then, the CPU usage is very high (> 80%), and it did not change lower, otherwise I kill the program manually

So,

* I am not sure how to debug the CPU usage issue.

* anything I need to take care if I switch between different scenes? for example, some resources I have to release?