Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cleaning up leaked objects

Discussion in 'Editor & General Support' started by Marble, Oct 12, 2007.

  1. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    My converted Unity project is getting a new debug warning in 2.0:

    Code (csharp):
    1. Cleaning up leaked objects in scene since no game object, component or manager is referencing them
    2.  MonoBehaviour has been leaked 6 times.
    Sometimes it's
    Code (csharp):
    1. DataTemplate has been leaked 1 times
    Is there a way for me to tell which object is being referred to here? It doesn't sound serious, but it is annoying.

    Double-clicking doesn't take me anywhere, and no line is drawn.
     
  2. Samantha

    Samantha

    Joined:
    Aug 31, 2005
    Posts:
    609
    This is an internal message related to how we're handling meta data. It's actually a message informing you that some optimizations have been made. One could argue it's not necessary, but for now it's not hurting anything. A simple clear of the Console will get rid of the error.
     
  3. dingben

    dingben

    Joined:
    May 23, 2010
    Posts:
    45
    I am not sure if this is related, I had never seen this message from 2.6 to 3.1, but I just got it on 3.3 on a new scene, just started, where I have only a few objects.
    (I did copy the terrain from another scene, using the 'Export heightmap - Raw' option.)

    The error occurred after I had deleted 2 objects container each containing about 25 objects nested 2 deep(or 50 total)
    I cleared the console, after reading this thread... all seems ok.
     
    Last edited: Mar 10, 2011