Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Invalidate the `_editHoldTimer` before releasing `_buttons` #806

Closed
wants to merge 1 commit into from

2 participants

@mattrubin

Invalidate the _editHoldTimer before releasing _buttons to avoid the crash which occurs when editHoldTimer: is called after the button which triggered it has been deallocated. If setPages: or setColumnCount: are called between when the button is touched and when the timer goes off one second later, the button the timer references will have been deallocated, leading to a crash.

@mattrubin mattrubin Invalidate the `_editHoldTimer` before releasing `_buttons` to avoid …
…the crash which occurs when `editHoldTimer:` is called after the button which triggered it has been deallocated
fb84404
@jamesgpearce

Facebook has not maintained or supported Three20 for some time, and we are closing its old and outstanding pull requests.

Many, many thanks for your support of the project. If you have any further questions, please don't hesitate to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 18, 2012
  1. @mattrubin

    Invalidate the `_editHoldTimer` before releasing `_buttons` to avoid …

    mattrubin authored
    …the crash which occurs when `editHoldTimer:` is called after the button which triggered it has been deallocated
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/Three20UI/Sources/TTLauncherView.m
View
3  src/Three20UI/Sources/TTLauncherView.m
@@ -800,6 +800,7 @@ - (void)setPages:(NSArray*)pages {
[pageCopy release];
}
+ TT_INVALIDATE_TIMER(_editHoldTimer);
TT_RELEASE_SAFELY(_buttons);
[self setNeedsLayout];
}
@@ -810,6 +811,8 @@ - (void)setColumnCount:(NSInteger)columnCount {
if (_columnCount != columnCount) {
_columnCount = columnCount;
_rowCount = 0;
+
+ TT_INVALIDATE_TIMER(_editHoldTimer);
TT_RELEASE_SAFELY(_buttons);
[self setNeedsLayout];
}
Something went wrong with that request. Please try again.