Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit 8511728

Browse files
author
Ian Gordon
committed
Rollback CADisplayLink change causing a crash in an internal client.
Reviewers: ajsecord, randallli, O1 Material components iOS Reviewed By: randallli, O1 Material components iOS Tags: #material_components_ios Differential Revision: http://codereview.cc/D1497
1 parent e3a0d41 commit 8511728

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

components/FlexibleHeader/src/MDCFlexibleHeaderView.m

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,11 @@ - (float)fhv_dragCoefficient {
488488
- (void)fhv_startDisplayLink {
489489
[self fhv_stopDisplayLink];
490490

491-
// CADisplayLink retains its target. Avoid retain loop by using NSInvocation to hold onto self
492-
// with a weak reference.
493-
SEL selector = @selector(fhv_shiftAccumulatorDisplayLinkDidFire:);
494-
NSInvocation *invocation =
495-
[NSInvocation invocationWithMethodSignature:[self methodSignatureForSelector:selector]];
496-
invocation.target = self;
497-
invocation.selector = selector;
491+
// NOTE: This may cause a retain cycle.
492+
// cl/129917749
498493
_shiftAccumulatorDisplayLink =
499-
[CADisplayLink displayLinkWithTarget:invocation selector:@selector(invoke)];
494+
[CADisplayLink displayLinkWithTarget:self
495+
selector:@selector(fhv_shiftAccumulatorDisplayLinkDidFire:)];
500496
[_shiftAccumulatorDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
501497
}
502498

0 commit comments

Comments
 (0)