Search Unity

Allocator.Temp not reporting leak

Discussion in 'Entity Component System' started by alfiare, Jan 10, 2020.

  1. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    I'm noticing that doing the following on the main thread or in a job and then not ever disposing of it does not create a reported leak (where as TempJob does).

    NativeList<byte> b = new NativeList<byte>(16, Allocator.Temp);

    Is Allocator.Temp allocated memory getting automatically cleaned up somewhere? Or is it just not reporting?
     
  2. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    I think it may be cleaned automatically.

    https://unity3d.com/jp/unity/whats-new/unity-2018.3.0
     
  3. alfiare

    alfiare

    Joined:
    Feb 10, 2017
    Posts:
    30
    Awesome, thanks!