Skip to content

Commit

Permalink
fix(ios): trying to fix crash issue (#12760)
Browse files Browse the repository at this point in the history
Fixes TIMOB-28296
  • Loading branch information
build committed Apr 29, 2021
1 parent 6b3a9ec commit 0468283
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions iphone/Classes/TiUIPickerProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ - (NSString *)apiName
return @"Ti.UI.Picker";
}

- (void)dealloc
{
RELEASE_TO_NIL(pickerKeySequence);
[super dealloc];
}

- (void)_destroy
{
RELEASE_TO_NIL(selectOnLoad);
Expand Down Expand Up @@ -104,8 +110,7 @@ - (TiUIPickerColumnProxy *)columnAt:(NSInteger)index
TiUIPickerColumnProxy *column = [[TiUIPickerColumnProxy alloc] _initWithPageContext:[self executionContext]];
column.column = index;
[columns addObject:column];
[column release];
return column;
return [column autorelease];
}

#pragma mark support methods for add:
Expand Down Expand Up @@ -254,9 +259,9 @@ - (void)add:(id)args
TiUIPickerRowProxy *row = [[TiUIPickerRowProxy alloc] _initWithPageContext:[self executionContext] args:[NSArray arrayWithObject:rowdata]];
TiUIPickerColumnProxy *column = [self columnAt:0];
NSNumber *rowIndex = [column addRow:row];
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:row, @"row", column, @"column", rowIndex, @"rowIndex", nil];
[row release];

NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:row, @"row", column, @"column", rowIndex, @"rowIndex", nil];
[self addRowOfDicts:params];
}
} else {
Expand Down

0 comments on commit 0468283

Please sign in to comment.