Search Unity

TempJob NativeContainer make warnings in FixedUpdate JobComponentSystem

Discussion in 'Data Oriented Technology Stack' started by Kichang-Kim, Dec 17, 2018.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    311
    Hi, I found that FixedUpdate JobComponentSystem makes memory leak warning for its native container.

    My system makes NativeHashMap every frame using TempJob flag and dispose it at the head of next frame. But when I change my system from UpdateBefore(typeof(PreLateUpdate)) to UpdateAfter(typeof(FixedUpdate)), it starts to say that native contaier is not disposed over 4 frame.

    I think the reason is that the fixed timestep of my project is larger than normal timestep (different fps?).

    So, is this intended behaviour? or bug?

    Thanks.
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,432
    Again, this has already been discussed a hundred times in this forum :)
     
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    311
    @eizenhorn
    I searched in this forum using kewords FixedUpdate, Job, Dispose but I can' find any thread discussing about this issue. Can you provide me any source? Thanks.
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,432
  5. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    311
    Thanks for source!

    It says long term jobs, but it seems that the FixedUpdate frame should also be handled as same way that when fixed delta time is longer than normal deltaTime.