Skip to content

Commit

Permalink
Add assertion in dealloc that it is on main in ASTextKitComponents (#603
Browse files Browse the repository at this point in the history
)
  • Loading branch information
maicki committed Oct 5, 2017
1 parent dd90978 commit 4379b31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/TextKit/ASTextKitComponents.mm
Expand Up @@ -16,6 +16,7 @@
//

#import <AsyncDisplayKit/ASTextKitComponents.h>
#import <AsyncDisplayKit/ASAssert.h>

#import <tgmath.h>

Expand Down Expand Up @@ -64,6 +65,8 @@ + (instancetype)componentsWithTextStorage:(NSTextStorage *)textStorage

- (void)dealloc
{
ASDisplayNodeAssertMainThread();

// Nil out all delegate to prevent crash
_textView.delegate = nil;
_layoutManager.delegate = nil;
Expand Down

0 comments on commit 4379b31

Please sign in to comment.