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

Some notification observers are not removed #20994

Closed
crazytonyli opened this issue Jul 3, 2023 · 1 comment · Fixed by #20973
Closed

Some notification observers are not removed #20994

crazytonyli opened this issue Jul 3, 2023 · 1 comment · Fixed by #20973
Assignees

Comments

@crazytonyli
Copy link
Contributor

There are many places that calls NotificationCenter.addObserver(forName:object:queue:using:) and discards its return value, which leads to the observer not being unregistered.

Observers not getting unregistered will cause some problems:

  1. The block argument will not be released, which causes some objects not being released in some cases.
  2. The observer code is executed at a time that you don't expect them to execute.
@crazytonyli crazytonyli self-assigned this Jul 3, 2023
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jul 3, 2023

Fails
🚫 Please add a feature label to this issue. e.g. 'Stats'

Generated by 🚫 dangerJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant