Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Console Log Memory Leak

Discussion in 'Editor & General Support' started by paatz04, Aug 5, 2019.

  1. paatz04

    paatz04

    Joined:
    Aug 1, 2013
    Posts:
    35
    Does someone have an idea how this can happen? I'm just using a few Debug.Log and this only happens in one scene. The GC Alloc increases with every log - there is no increasing logs visible in the editor console tho.

    Would appreciate any hint! Thank you
    Screen Shot 2019-08-05 at 11.56.17 PM.png
     
  2. alexeyzakharov

    alexeyzakharov

    Unity Technologies

    Joined:
    Jul 2, 2014
    Posts:
    295
    In the Editor you can enable Deep Profiler to see intermediate C# methods which cause LogStringToConsole call and the method which is invoked through Application.LogCallback - that is a public API and pretty much any plugin can hook into the log.
     
  3. paatz04

    paatz04

    Joined:
    Aug 1, 2013
    Posts:
    35
    Thank you! Found the culprit - I had an old script attached not releasing accumulated logs:

    Application.logMessageReceived += HandleLog;
     
    alexeyzakharov likes this.