alibaba / alibaba/flutter_boost
Memory waste of addEventListener in FlutterBoostPlugin
- Dominant language
- Dart
- Stars
- 7.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/alibaba/flutter_boost/blob/6df80cc1ea425cde1bac7d0265407977221061df/ios/Classes/FlutterBoostPlugin.m#L206
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];`
Contributor guide
No contributing guide indexed for this repository
Research direction
Open ios/Classes/FlutterBoostPlugin.m around line 206 and trace the listener-removal path in FlutterBoostPlugin. Confirm that an empty listeners collection is no longer retained in self.listenersTable after removal. Done when the empty entry is removed while the existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, objective-c
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100