Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various memory leaks #11578

Merged
merged 3 commits into from
Feb 18, 2023

Commits on Feb 18, 2023

  1. MemoryViewWidget: Fix memory leaks

    bp_item/row_item/item were never deleted, and the normal Qt ownership system wasn't applying to them because they were being cloned.
    Pokechu22 committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    1c5e223 View commit details
    Browse the repository at this point in the history
  2. CodeViewWidget: Fix memory leak

    Per https://doc.qt.io/qt-6/qabstractitemview.html#setItemDelegateForColumn setItemDelegateForColumn does not take ownership of the parameter, so it was not being deleted. Specifying a parent to QObject (via QStyledItemDelegate's constructor) will allow it to automatically be deleted, per https://doc.qt.io/qt-6/objecttrees.html. The other instance of a QItemDelegate in IOWindow.cpp already used this.
    Pokechu22 committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    b6d4762 View commit details
    Browse the repository at this point in the history
  3. InputCommon: Fix memory leak in ExpressionParser

    We allocate in MakeSuppressor via `return unique_ptr(std::make_unique<...>(...).release(), InvokingDeleter{}`, so it wasn't properly getting freed.
    Pokechu22 committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    f1f3fd5 View commit details
    Browse the repository at this point in the history