From dd90978fb60cb8cc6cc51cdba115a84ffd720b5a Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 4 Oct 2017 06:52:49 -0700 Subject: [PATCH] ASTextKitComponents needs to be deallocated on main (#598) --- Source/Private/ASInternalHelpers.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Private/ASInternalHelpers.m b/Source/Private/ASInternalHelpers.m index 7727967c4f..e0d757101b 100644 --- a/Source/Private/ASInternalHelpers.m +++ b/Source/Private/ASInternalHelpers.m @@ -91,6 +91,7 @@ void ASPerformBackgroundDeallocation(id object) BOOL ASClassRequiresMainThreadDeallocation(Class c) { + // Specific classes if (c == [UIImage class] || c == [UIColor class]) { return NO; } @@ -101,10 +102,16 @@ BOOL ASClassRequiresMainThreadDeallocation(Class c) return YES; } + // Apple classes with prefix const char *name = class_getName(c); if (strncmp(name, "UI", 2) == 0 || strncmp(name, "AV", 2) == 0 || strncmp(name, "CA", 2) == 0) { return YES; } + + // Specific Texture classes + if (strncmp(name, "ASTextKitComponents", 19) == 0) { + return YES; + } return NO; }