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 casimps1 · Sep 24, 2012 at 04:46 PM · memoryprofilerleak

Why does Unity's memory usage increase continuously while the profiler reports static usage?

I'm trying to debug what appears to be a memory leak of some sort. When I start a particular scene in my game (running in the editor on a Win XP box) after maybe 30 minutes sitting still in the scene, the editor crashes with a message saying something like "fatal error in gc too many heap sections".

If I look at Windows Task Manager while the game is running I see the Unity.exe Mem Usage start around 200MB and slowly and continuously build up to about 600MB before it finally crashes. So, I immediately think memory leak. The thing that's confusing me is that I also pull up the Unity Profiler and look at the memory usage in there. It shows a flat 100MB used from the time the game starts to the time it crashes.

I know I still need to investigate my Update() functions to make sure there's no weird object creation going on there. Though, I can't think what I might be doing that the GC wouldn't be able to take care of on its own.

Regardless, I don't understand why I only see memory increase in the Task Manager but not the Unity Profiler. My instinct says that's a leak in Unity itself rather than anything I've done, but I don't know for sure.

Any ideas?

Comment
Add comment · Show 10
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 Tak · Sep 25, 2012 at 08:30 AM 0
Share

casimps1: I suggest that you submit a bug report with your project.

avatar image GVGiu · Nov 06, 2012 at 05:35 PM 0
Share

I noticed the same problem, you can create a clean scene on a clean project with no assets and still when the standalone player runs, memory starts building up, at a very slow pace (about 4$$anonymous$$/5sec) Even calling System.GC.Collect() periodically has no effect on this issue.

avatar image cygnusfear · Nov 07, 2012 at 03:35 PM 0
Share

Does the same thing happen when you build the project? If not, it might have something to do with the added overhead from the Unity editor.

avatar image GVGiu · Nov 07, 2012 at 03:38 PM 0
Share

It does, actually, I tested a builded standalone windows client, not playing inside Unity.

avatar image Demigiant · Nov 07, 2012 at 09:17 PM 0
Share

Ow this looks terribly bad. What version of Unity are you using?

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

15 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

Related Questions

Memory Leak Help 2 Answers

Performance going down over time 2 Answers

When a animation is loaded to memory? 0 Answers

Unable to free resources from memory 0 Answers

iOS: Compressed audio not affecting memory? 2 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