Browse Source

free draft

B. Petersen 5 năm trước cách đây
mục cha
commit
b390d042ee
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      deltachat-ios/Controller/ChatViewController.swift

+ 2 - 0
deltachat-ios/Controller/ChatViewController.swift

@@ -209,8 +209,10 @@ class ChatViewController: MessagesViewController {
             if let cString = dc_msg_get_text(draft) {
                 let swiftString = String(cString: cString)
                 free(cString)
+                dc_msg_unref(draft)
                 return swiftString
             }
+            dc_msg_unref(draft)
             return nil
         }
         return nil