The child class removes itself from the parent panel, which calls the
DTOR. This automatically disconnects the events, so if we want to
explicitly do this, we need to do it before freeing the memory
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21307