mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-12 22:39:06 +08:00
Fabric: Proper implementation of -[RCTViewComponentView prepareForRecycle]
Summary: RCTViewComponentView retains an EventEmitter, so we have to clear this up after we recyled the view. Reviewed By: sahrens Differential Revision: D13196884 fbshipit-source-id: e9f2e2400be864c5c6177227255012101ed8c4d1
This commit is contained in:
committed by
Facebook Github Bot
parent
7fe3f90156
commit
ffd2409172
@@ -267,6 +267,12 @@ using namespace facebook::react;
|
||||
[self invalidateLayer];
|
||||
}
|
||||
|
||||
- (void)prepareForRecycle
|
||||
{
|
||||
[super prepareForRecycle];
|
||||
_eventEmitter.reset();
|
||||
}
|
||||
|
||||
- (UIView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||
{
|
||||
// This is a classic textbook implementation of `hitTest:` with a couple of improvements:
|
||||
|
||||
Reference in New Issue
Block a user