This is an automated email from the git hooks/post-receive script. apo pushed a commit to branch stretch in repository unknown-horizons.
commit 13a44a8671a392961c21727ae51024ea08890847 Author: Markus Koschany <[email protected]> Date: Mon Aug 21 08:53:51 2017 +0200 Add 1000-icon-mem-leak.patch and fix a memory leak. Thanks: Petter Reinholdtsen for the report and testing and LinuxDonald for the patch. Closes: #871037 --- debian/patches/1000-icon-mem-leak.patch | 27 +++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 28 insertions(+) diff --git a/debian/patches/1000-icon-mem-leak.patch b/debian/patches/1000-icon-mem-leak.patch new file mode 100644 index 0000000..8efa8d4 --- /dev/null +++ b/debian/patches/1000-icon-mem-leak.patch @@ -0,0 +1,27 @@ +Description: Fix small `get_res_icon_path()` widget leak + + `horizons.gui.util.get_res_icon_path()` does the same thing as as + `horizons.gui.widgets.imagebuton`: aks fife to create an `Icon()` to + see if it's a valid image path. But other than the `ImageButton`, + `get_res_icon_path()` did forget to call `hide()` on that `Icon`. So the + `Icon` stayed alive, even though unused. + + We now call `hide()` on that `Icon`. + +Origin: https://github.com/unknown-horizons/unknown-horizons/commit/25e933202e2db6083d0f163d978559c4ac24fb94 +Author: MasterofJOKers <[email protected]> +Bug-Debian: https://bugs.debian.org/871037 + +diff --git a/horizons/gui/util.py b/horizons/gui/util.py +index a7c13584b..2fb2796b3 100644 +--- a/horizons/gui/util.py ++++ b/horizons/gui/util.py +@@ -125,7 +125,7 @@ def get_res_icon_path(res, size=32, greyscale=False, full_path=True): + icon_path = icon_path + '{res:03d}.png'.format(res=res) + + try: +- Icon(image=icon_path) ++ Icon(image=icon_path).hide() + except fife.NotFound: # ImageManager: image not found, use placeholder or die + if res == 'placeholder': + raise Exception('Image not found: {icon_path}'.format(icon_path=icon_path)) diff --git a/debian/patches/series b/debian/patches/series index 633fed8..9d1d7c5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ VERSION.patch +1000-icon-mem-leak.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/unknown-horizons.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

