- Home /
Free memory used by unity in iOS
I have successfully integrated my Unity 3D application with my native iOS application. Now when I am done with the unity 3d application, i close it but that does not releases the memory used by unity. How do I make sure that the memory gets released?
Any help would be greatly appreciated.
Thanks, Mohit
not sure if this is of any help, but I'm assu$$anonymous$$g that the Unity process is still running in the background so can't you just kill it ?
don't know much about iOS applications so - how do you actually open the Unity player? like what language is the application written in?
The first thing that comes to $$anonymous$$d would be running some shell script or something like that that finds the process (probably by name), gets its PID and runs some kill command on it
Answer by Jamora · Mar 18, 2014 at 08:22 AM
In case you're not actually closing the application, but pausing it, you could try to have
void OnApplicationPause(){
Application.Quit();
}
Howewver, do pay attention to Apple's tech support, who strongly advice against programmatically closing applications. Also, Unity docs remind of the same thing.
After the application has been closed, there is nothing Unity can do to manage iOS memory; it's up to the operating system.
have already done that too, but it is not releasing the memory. BTW I am running the unity view inside a native ios application so i don't think exiting should create any issues, just that it is not releasing the memory.
Once you exit your Unity application, there is no thing you can do (from Unity) to release the memory. Does closing the native app release the memory?
perhaps the application is still using some pointer to the Unity player? and have you tried waiting a bit, perhaps it just takes some time to release the memory ?
@Jamora closing the native app will always release the memory bcoz that is handled by OS
Your answer
Follow this Question
Related Questions
Unity 4.3.4 iOS Warnings - iAD and Asset Catalog 0 Answers
building IPA with command line (missing scheme) 1 Answer
Lightmaps Problem when switch unity android to unity IOS 0 Answers
google analytics 0 Answers
Fp controller, ios bug. 0 Answers