From b24e8e4f816df868ef2a1049a77510852674838f Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 20 Dec 2018 09:32:48 -0500 Subject: [PATCH] Use autoreleasepool when rendering image editor output. --- .../ViewControllers/AttachmentApprovalViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift index e84076b8b..4ce2073ec 100644 --- a/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift +++ b/SignalMessaging/ViewControllers/AttachmentApprovalViewController.swift @@ -582,7 +582,11 @@ public class AttachmentApprovalViewController: UIPageViewController, UIPageViewC } var attachments: [SignalAttachment] { - return attachmentItems.map { self.processedAttachment(forAttachmentItem: $0) } + return attachmentItems.map { (attachmentItem) in + autoreleasepool { + return self.processedAttachment(forAttachmentItem: attachmentItem) + } + } } // For any attachments edited with the image editor, returns a