Skip to content

annotate: fix unloading#281

Merged
ammen99 merged 2 commits intomasterfrom
fix-annotate
Jul 17, 2025
Merged

annotate: fix unloading#281
ammen99 merged 2 commits intomasterfrom
fix-annotate

Conversation

@ammen99
Copy link
Member

@ammen99 ammen99 commented Jul 12, 2025

When annotate is loaded on non-GLES renderer, it will not initialize the
overlay array. So when we iterate at the end, it will crash as the array
is empty. Instead, we can iterate over all the elements in the array.
This way, it works also for empty arrays :)

In addition I also removed a few of the .reset() calls. They are not
necessary, as the memory will be freed automatically by the smart
pointers (shared_ptrs, unique_ptrs).

ammen99 added 2 commits July 12, 2025 14:06
When annotate is loaded on non-GLES renderer, it will not initialize the
overlay array. So when we iterate at the end, it will crash as the array
is empty. Instead, we can iterate over all the elements in the array.
This way, it works also for empty arrays :)

In addition I also removed a few of the .reset() calls. They are not
necessary, as the memory will be freed automatically by the smart
pointers (shared_ptrs, unique_ptrs).
@soreau
Copy link
Member

soreau commented Jul 12, 2025

LGTM! Feel free to merge when it's ready.

@ammen99 ammen99 merged commit 2ef35e8 into master Jul 17, 2025
6 checks passed
@ammen99 ammen99 deleted the fix-annotate branch July 17, 2025 08:12
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