5

After the face detection is done the memory will not release, is there is a way I could release it (the memory stay at 300MB after the process is done).

 autoreleasepool{
  manager.requestImageData(for: asset, options: option){
        (data, responseString, imageOriet, info) in
        if (data != nil){

            //let faces = (faceDetector?.features(in: CIImage(data: data!)!))
            guard let faces = self.faceDetector?.features(in: CIImage(data: data!)!) else {
                return
            }

            completionHandler((faces.count))

        }else{
            print(info)
        }
        }
    }

enter image description here

Idan Aviv
  • 1,253
  • 2
  • 13
  • 23

0 Answers0