From bf6ca9c2a445814091ab497f8d0528e30d0f903e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 17 Jan 2012 15:38:02 +0100 Subject: [PATCH] Destroy also values of record Otherwise the groups of xxx2many records stay in the memory due to reference cycle between Group and Record. review222006 --- tryton/gui/window/view_form/model/record.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index 9cc919927c..bc43f99963 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -602,5 +602,8 @@ class Record(SignalEvent): def destroy(self): super(Record, self).destroy() self.group = None + for v in self.value.itervalues(): + if hasattr(v, 'destroy'): + v.destroy() self.value = None self.next = None