Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

[ASCollectionView] Add strong Layer Pointer Under iOS < 9 to Workaround Crashes #1861

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

Adlai-Holler
Copy link
Contributor

Under iOS < 9, when a collection view is removed from the hierarchy and being prepared for deallocation, its layer may become a dangling pointer and put the collection view into a dangerous state where pretty much any call will crash.

This shouldn't be possible, since views are supposed to retain their layers, but it happens all the same. This adds a separate strong pointer to ASCollectionView to workaround the issue.

This issue is not technically ASDK-specific, but under ASDK it is far more likely to manifest because of the fact that ASDisplayNode intentionally keeps self alive for the next run loop turn in -didExitHierarchy

@ghost ghost added the CLA Signed label Jul 7, 2016
@Adlai-Holler Adlai-Holler merged commit 8e1c8ac into master Jul 8, 2016
@Adlai-Holler Adlai-Holler deleted the AHCollectionViewLayerRetaining branch July 8, 2016 01:26
aimalygin pushed a commit to aimalygin/AsyncDisplayKit that referenced this pull request Sep 16, 2020
…Image (facebookarchive#1861)

* Fix -[ASNetworkImageNode setURL:resetToDefault:] forget to reset animatedImage

* add ASNetworkImageNodeTest for reset with animatedImage
aimalygin pushed a commit to aimalygin/AsyncDisplayKit that referenced this pull request Sep 16, 2020
* master_up: (43 commits)
  Do not expose tgmath.h to all clients of Texture (facebookarchive#1900)
  Call will / did display node for ASTextNode. Fixes facebookarchive#1680 (facebookarchive#1893)
  Remove background deallocation helper code (facebookarchive#1890)
  [Accessibility] Ship ASExperimentalDoNotCacheAccessibilityElements (facebookarchive#1888)
  🎉 3.0.0 (facebookarchive#1883)
  Upgrade to Xcode 11.5 (facebookarchive#1877)
  Renames AS_EXTERN and ASViewController (facebookarchive#1876)
  Improve ThreeMigrationGuide.md (facebookarchive#1878)
  Add a 3.0 migration guide (facebookarchive#1875)
  I forgot this in the last PR and I'm pushing to master, I'm a bad person.
  Update for 3.0.0-rc.2 (facebookarchive#1874)
  Update RELEASE.md (facebookarchive#1873)
  Fix all the warnings and re-enable on CI (facebookarchive#1872)
  Prepare for 3.0.0-rc.1 release (facebookarchive#1870)
  -[ASNetworkImageNode setURL:resetToDefault:] forget to reset animatedImage (facebookarchive#1861)
  [ASDisplayNode] Implement accessibilityElementsHidden (facebookarchive#1859)
  Fix documentation for ASCornerRoundingTypeClipping (facebookarchive#1863)
  Add iOS13 UIContextMenu api to ASCommonCollectionDelegate (facebookarchive#1860)
  [ASDisplayNode] Implement accessibilityViewIsModal (facebookarchive#1858)
  Update FBSnapshotTestCase to iOSSnapshotTestCase (=6.2) (facebookarchive#1855)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant