Hi, On Mi, 2014-08-20 at 11:12 +1200, Clemens wrote: > there is quite a big memory leak in the gui. Every time I go to the next > sheet ~35Mb are gone... So after around 60 sheets I need to restart the > gui cause otherwise it will crash. > > Do you know about that problem? Let me know if you need some information > about my system!
Woha, nope, I had not noticed this issue. SDAPS actually kept all the images loaded in memory instead of freeing them again, so it is not surprising that you are seeing quite a big memory leak. I have committed and pushed the attached patch, which should fix it. Thanks for reporting the issue! Benjamin
From 00bb57bed402aa1e170cb5541566964ad58bbb2c Mon Sep 17 00:00:00 2001 From: Benjamin Berg <[email protected]> Date: Wed, 20 Aug 2014 01:43:34 +0200 Subject: [PATCH] Free images before going to next page. This fixes an issue where all image data was leaked when moving forward/backward in the user interface. --- sdaps/gui/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdaps/gui/__init__.py b/sdaps/gui/__init__.py index 41f490e..c2f8be8 100644 --- a/sdaps/gui/__init__.py +++ b/sdaps/gui/__init__.py @@ -99,6 +99,8 @@ class Provider(object): self.qualities.append((self.survey.sheet.quality, len(self.qualities))) def next(self, cycle=True): + self.image.surface.clean() + if self.index >= len(self.images) - 1: if cycle: self.index = 0 @@ -107,14 +109,14 @@ class Provider(object): else: self.index += 1 - self.image.surface.clean() - self.image.surface.load_rgb() self.survey.goto_sheet(self.image.sheet) return True def previous(self, cycle=True): + self.image.surface.clean() + if self.index <= 0: if cycle: self.index = len(self.images) - 1 @@ -123,8 +125,6 @@ class Provider(object): else: self.index -= 1 - self.image.surface.clean() - self.image.surface.load_rgb() self.survey.goto_sheet(self.image.sheet) -- 2.1.0.rc1
signature.asc
Description: This is a digitally signed message part
