Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by mohitramani · Mar 18, 2014 at 07:26 AM · unity ios

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

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ShadoX · Mar 18, 2014 at 07:42 AM 0
Share

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 ?

avatar image mohitramani · Mar 18, 2014 at 07:57 AM 0
Share

That's what I want to do, but want to know how.

avatar image ShadoX · Mar 18, 2014 at 08:54 AM 0
Share

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mohitramani · Mar 18, 2014 at 08:57 AM 0
Share

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.

avatar image Jamora · Mar 18, 2014 at 09:20 AM 0
Share

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?

avatar image ShadoX · Mar 18, 2014 at 09:27 AM 0
Share

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 ?

avatar image deokardattatray · Mar 19, 2014 at 09:05 AM 0
Share

@Jamora closing the native app will always release the memory bcoz that is handled by OS

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges