Search Unity

NativeQueue<T>.ParallelWriter leak [preview-0.1.1]

Discussion in 'Entity Component System' started by elcionap, Aug 8, 2019.

  1. elcionap

    elcionap

    Joined:
    Jan 11, 2016
    Posts:
    138
    Haven't test it on earlier versions, but using Unity 2019.2.0f1 and Unity.Collections preview-0.1.1, using the ParallelWriter version will cause leak when trying to Dequeue. You can replicate this in the main thread or in a job. All you need is NativeQueue<T>.ParallelWriter version executing Enqueue.

    I have submitted a repo with the case number 1175386.

    []'s
     
    Deleted User likes this.
  2. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Hmm does this also result in the Dequeue returning false when it should be true? They fixed that in 0.1.1 for the non concurrent version and it also leaked memory as a side effect.
     
    elcionap likes this.
  3. elcionap

    elcionap

    Joined:
    Jan 11, 2016
    Posts:
    138
    Nop, the result is correctly true. The only odd think is the leak.

    []'s
     
  4. bkaradzic

    bkaradzic

    Joined:
    Jul 18, 2019
    Posts:
    2
    This is fixed in [0.2.0-preview] - 2019-08-28.
     
    elcionap likes this.