← Back to team overview

gtg-contributors team mailing list archive

[Bug 619603] Re: Confirm we want to remove a task just remove the task from the ui, the task still exist. (This can cause huge memory leaks)

 

We can't let a so big memory issue in GTG. (For someone that would use
GTG all day it would be very bad) and as we're approaching slowly from
the release, I'm setting this as critical. (This seems like a easy fix
for anyone that knows a bit of pyGTK).

 Note to self : (Actually the only way I found to do this (I hate
pyGTK), would be to store results given by delete_tasks() about what
tasks need to be deleted and then use this variable in
on_delete_confirmation(). But I'm not sure about how to this right.)

** Changed in: gtg
   Importance: High => Critical

** Tags added: love release-critical

-- 
Confirm we want to remove a task just remove the task from the ui, the task still exist. (This can cause huge memory leaks)
https://bugs.launchpad.net/bugs/619603
You received this bug notification because you are a member of Gtg
contributors, which is subscribed to Getting Things GNOME!.

Status in Getting Things GNOME!: Confirmed

Bug description:
[From both bzr and ppa.]

This was firstly reported as a comment in another mine report bug. Reporting here as those are separate bugs.

How to reproduce the bug.
Launch gtg.
Create a Task.
Fill it with some text (Like ~5000 char to see the problem.)
Look at memory used by the process.
Remove the task.
Look at the memory used by the process.
The memory is not freed...

Expected:
Memory is freed when task is deleted, not just delete the task from the ui.

This is severe for a user that would use frequently gtg without ever restarting it. (Why would you restart it, you can hibernate, etc...), the memory would grow little by little (Even with not so big content tasks.)...

Why is there this problem ?

Because when you confirm that you want to delete the task the code is this one:

    def on_delete_confirm(self, widget):
        """if we pass a tid as a parameter, we delete directly
        otherwise, we will look which tid is selected"""
        for tid in self.tids_todelete:
            task = self.req.delete_task(tid)
        self.tids_todelete = []

And self.tids_todelete is []