Commit 5fd6bcf
AnnotationManagerImpl memory leak (#10999)
https://mapbox.atlassian.net/browse/MAPSAND-2594
## Summary
- Fix native memory leak where bitmap style images added by
PointAnnotation were never removed from the style when annotations were
deleted via delete(), deleteAll(), or onDestroy().
- Add removeIconFromStyle / removeIconsFromStyle helpers that clean up
style images with the ICON_DEFAULT_NAME_PREFIX prefix, matching the
existing addIconToStyle counterpart.
- The cleanup only targets auto-generated images (prefixed with
icon_default_name_) so user-managed style images are unaffected.
cc @mapbox/maps-android
cc @mapbox/sdk-platform
GitOrigin-RevId: 96531e5cdc0799404169ca092b520c759e16071a1 parent ae3edb0 commit 5fd6bcf
2 files changed
Lines changed: 15 additions & 0 deletions
File tree
- plugin-annotation/src/main/java/com/mapbox/maps/plugin/annotation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
650 | 662 | | |
651 | 663 | | |
652 | 664 | | |
| |||
762 | 774 | | |
763 | 775 | | |
764 | 776 | | |
| 777 | + | |
765 | 778 | | |
766 | 779 | | |
767 | 780 | | |
| |||
0 commit comments