From 0349b8e5ba833db0b74e86ff62651eb9f00361b0 Mon Sep 17 00:00:00 2001 From: Miguel Sancho Date: Thu, 29 Mar 2018 13:24:22 +0200 Subject: [PATCH] fix #3 memory leak --- FPVDemo/FPVViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/FPVDemo/FPVViewController.swift b/FPVDemo/FPVViewController.swift index 4988cb3..9e1b183 100755 --- a/FPVDemo/FPVViewController.swift +++ b/FPVDemo/FPVViewController.swift @@ -181,6 +181,7 @@ class FPVViewController: UIViewController, DJIVideoFeedListener, DJISDKManagerD let videoBuffer = UnsafeMutablePointer.allocate(capacity: videoData.length) videoData.getBytes(videoBuffer, length: videoData.length) VideoPreviewer.instance().push(videoBuffer, length: Int32(videoData.length)) + videoBuffer.deallocate(capacity: videoData.length) } // IBAction Methods