x


garbage collection in between scene changes?

I have two scenes A and B. Scene B is more memory intensive than A.

I can load scene B from A without a problem, but when I try to go back to A from B, the iPad app crashes. I think the app might have been using too much memory and iOS was forced to kill it...

Hence my question: Does Unity unload gameobjects (and free memory) from the previous scene before changing to another?

Thanks for your help!

more ▼

asked Mar 04 '11 at 10:28 AM

Kijun gravatar image

Kijun
98 14 14 24

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Hi,

Check this answer.

Bye,

Jean

more ▼

answered May 09 '11 at 05:46 AM

Jean Fabre gravatar image

Jean Fabre
3.1k 69 76 103

Link doesn't work, what's the answer?

Sep 13 '11 at 01:09 AM sandworm

then search the 'Check this answer' link in Google and get this;

New and improved link; http://unity3d.qatohost.com/questions/50562/ipad-real-memory-accumulation-how-to-prevent-this.html

Sep 13 '11 at 01:43 AM vxssmatty
(comments are locked)
10|3000 characters needed characters left

I had a similar problem, even loading a blank scene started crashing my game. My problem was i had too many images in the Resources folder("which I created under assets"). The Resources folder loads everything in it into memory when the game starts. When the game was running the phone memory was getting used up by images that didn't necessarily need to be in memory all the time.

Hope this helps.

more ▼

answered May 09 '12 at 08:10 AM

Richard 3 gravatar image

Richard 3
424 46 50 61

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x744
x367
x109
x19
x18

asked: Mar 04 '11 at 10:28 AM

Seen: 2472 times

Last Updated: May 09 '12 at 08:11 AM