Skip to content

Conversation

@artonragsdale
Copy link

STPopup may lose its reference to view controller, especially after memory warning, causing bad access crash.
Checking for existence of view controller before removing observer prevents the crash

STPopup may lose its reference to view controller, especially after memory warning, causing bad access crash.
Checking for existence of view controller before removing observer prevents the crash
@kevin-lyn
Copy link
Owner

@artonragsdale _viewControllers in STPopupController holds strong reference of UIViewController, and it's not cleaned up when memory warning is received. Even it's set to nil, calling a function to nil will not crash. Do you have any crash log on this issue?

@artonragsdale
Copy link
Author

@kevin0571 I actually fixed this a while ago and just got around to submitting a pull request but it did solve a crash bug my app was experiencing. I'll have to look back through old crash reports to see if I can find it.

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.

2 participants