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 some memory leaks from recreating UserControls #1044

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Oct 5, 2019

  1. Add methods to refresh the recipe view.

    We do not want to create a new RecipeView every time we need to refresh
    the recipes; this leads to leaking RecipeView objects, which have
    subscribed event listeners.  This isn't the most elegant solution, but
    it gets the job done.
    thailyn committed Oct 5, 2019
    Configuration menu
    Copy the full SHA
    42fc280 View commit details
    Browse the repository at this point in the history
  2. Reuse the same RefreshView; do not recreate it.

    Also add a method to clear the contents of the RefreshView between times
    it is displayed.  Recreating the RefreshView every time is a small
    memory leak.
    thailyn committed Oct 5, 2019
    Configuration menu
    Copy the full SHA
    434b545 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    31da614 View commit details
    Browse the repository at this point in the history
  4. Reuse StashView when refreshing the stash.

    Recreating the StashView every time we want to refresh the stash is a
    memory leak, and makes Procurement lag while it rebuilds the stash.  As
    an added bonus, now the last-selected stash tab remains selected when
    revisiting the stash.
    thailyn committed Oct 5, 2019
    Configuration menu
    Copy the full SHA
    9ed2ba4 View commit details
    Browse the repository at this point in the history
  5. Fire onStashLoaded for loading inventories.

    The onStashLoaded events were not being fired when loading character
    inventories, so 1) there was no loading message for these "tabs" when
    refreshing [used] tabs, and 2) the appropriate actions to take when
    reloading tabs were not happening.
    thailyn committed Oct 5, 2019
    Configuration menu
    Copy the full SHA
    219b8ee View commit details
    Browse the repository at this point in the history