Skip to content

Commit

Permalink
Add assertion in dealloc that it is on main in ASTextKitComponents (T…
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki authored and bernieperez committed Apr 25, 2018
1 parent 44db068 commit 23f224e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/TextKit/ASTextKitComponents.mm
Original file line number Diff line number Diff line change
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 23f224e

Please sign in to comment.