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

Memory waste of addEventListener in FlutterBoostPlugin #2183

Open
qiang-dev opened this issue Feb 21, 2025 · 0 comments
Open

Memory waste of addEventListener in FlutterBoostPlugin #2183

qiang-dev opened this issue Feb 21, 2025 · 0 comments

Comments

@qiang-dev
Copy link

[listeners removeObject:listener];

After [listeners removeObject:listener];, if listeners is empty, it should be removed from self.listenersTable.

It is recommended to append the following method after [listeners removeObject:listener];:

if (listeners.count == 0) [self.listenersTable removeObjectForKey:key];

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

No branches or pull requests

1 participant