Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23150] iOS: EventListener issues in ScrollableView for IOS. #7923

Merged
merged 1 commit into from
Apr 13, 2016

Conversation

AngelkPetkov
Copy link
Contributor

JIRA

Fixed issue with JS object being garbage collected causing the views to have no bridge with the objective-C objects.

[JIRA](https://jira.appcelerator.org/browse/TIMOB-23150?filter=-1)
Fixed issue with JS object  being garbage collected causing the views to have no bridge with the objective-C objects.
@@ -73,9 +73,6 @@ -(NSUInteger)viewCount

-(void)setViews:(id)args
{
#if defined(TI_USE_AUTOLAYOUT) || defined(TI_USE_KROLL_THREAD)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested those issues most of which do relate directly here and none of them have reverted to their broken state. We only need the removeFromSuperview to run on the main thread the rest it doesn't matter if they are running on the kroll or mainThread. The reason this fixes the current issue is because once a js object is out the scope in this case the for loop it will get garbage collected as you know. We create a bridge between the objective C object and the js so it does get retained however when all of this was running on the main-thread while we're running the application on the kroll-thread, the kroll thread would have finished executing first. Collecting the JS object before the main-thread had a chance to tell the program to retain it.

@cheekiatng
Copy link
Contributor

Well. Go ahead to merge and resolve the ticket if you guys think nothing is going to break then.

@pec1985
Copy link
Contributor

pec1985 commented Apr 13, 2016

PR APPROVED!

@pec1985 pec1985 merged commit f55576c into tidev:master Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants