Swift: UnsafeMutablePointer.deinitialize fatal error with negative count when appending to array

前端 未结 2 1180
花落未央
花落未央 2021-02-05 04:56

The code below generates this error (appending to exporters):

fatal error: UnsafeMutablePointer.deinitialize with negative count

2条回答
  •  日久生厌
    2021-02-05 05:32

    I have solved this type of issue like this way:

    DispatchQueue.global(qos: .background).sync {
            //your code 
        }
    

提交回复
热议问题