fix(ui): accordion_button leaks
Description
sight::ui::qt::widget::accordion_button
leaks. It allocates memory on the heap m_animation_group
but never frees it.
Thankfully, the leak only occurs once (upon destruction), and not each time the widget triggers its animation.
Steps to reproduce
Run valgrind or any static analysis.
Functional specifications
This shouldn't leak.
Technical specifications
Apply this patch:
TL;DR:
- Allocate
m_animation_group
on the stack
Test plan
- Sight viewer shouldn't crash on exit (which would mean a double-free).
- Valgrind should be enough for the rest.