mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fabric: Proper implementation -[RCTParagraphComponentView prepareForRecycle]`
Summary: Over-retaining a LocalData object inside the View can cause a crash during tearing down JS VM because LocalData can indirectly retain EventEmitter objects which were not properly "disabled". Reviewed By: sahrens Differential Revision: D13196887 fbshipit-source-id: 001d9fadf775c89f750c84fe8da9b84d4636631c
This commit is contained in:
committed by
Facebook Github Bot
parent
ffd2409172
commit
215a0f0f21
@@ -63,6 +63,12 @@ using namespace facebook::react;
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)prepareForRecycle
|
||||
{
|
||||
[super prepareForRecycle];
|
||||
_paragraphLocalData.reset();
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
if (!_paragraphLocalData) {
|
||||
|
||||
Reference in New Issue
Block a user