Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] Check for IsDisposed() before accessing renderer View #1032

Closed
wants to merge 2 commits into from

Conversation

samhouts
Copy link
Member

@samhouts samhouts commented Jul 5, 2017

Description of Change

Containers on Android that inflate renderers as Views currently only check to see if the renderer is null. With the new Fast Renderers, it is possible for the Views themselves to be collected before the renderer is set to null. This change will ensure that the View is not disposed, and if it is, go ahead and rebuild the View from the renderer to prevent an ObjectDisposedException.

Observed on ScrollView, so there is a test case to prove the fix. Added the checks on several other suspicious container elements for good measure.

Bugs Fixed

Not targeted at a specific ticket, but it is possible that one or more of the recent ObjectDisposed tickets on 2.3.5 are resolved by this.

API Changes

None

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@samhouts samhouts closed this Jul 6, 2017
@StephaneDelcroix StephaneDelcroix deleted the fastlabelrenderernre branch July 24, 2017 20:38
@samhouts samhouts added this to To do in Sprint 169 Apr 30, 2020
@samhouts samhouts removed this from To do in Sprint 169 Apr 30, 2020
@samhouts samhouts added this to To do in Sprint 169 Apr 30, 2020
@samhouts samhouts removed this from To do in Sprint 169 Apr 30, 2020
@samhouts samhouts modified the milestones: 4.7.0, 4.6.0 Jun 9, 2020
@samhouts samhouts added this to In Review in v4.6.0 Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
v4.6.0
  
In Review
Development

Successfully merging this pull request may close these issues.

None yet

2 participants