GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
503 stars 55 forks source link

feat(Composer): goodbye dispose #971

Closed GeopJr closed 1 month ago

GeopJr commented 1 month ago

Ages ago, we had to dispose the composer due to an undefined/unfixable memory leak. Some experience on fixing leaks later, we now know that it's lambdas and bind_models. For bind_models, I used the same workaround as timelines - removing all items when its time to clean them aka when the window closes. For lambdas, the typical moving them into their own methods. This time however, using bind_property without lambdas would also leak, so they became notifications.

On #805, tuba would segfault due to libspelling. That was because the user would close the composer while libspelling was finishing a task, and since closing required disposing, the composer page would get disposing along with libspelling before it was done and result into a segfault.

fix: #805