Import 2017-06-07 23:51:09: master fc57c6e6

Author Committer Branch Timestamp Parent
msmolens msmolens master 2015-09-18 10:51:14 master 71602609
Affected Issues 0004048: Fix memory leaks associated with py_StandaloneEditorWidgetTest
Changeset

BUG: Fix memory leaks associated with py_StandaloneEditorWidgetTest

In a debug build running running py_StandaloneEditorWidgetTest reports that a
number of VTK class instances leak.

The leaks occur because EditorWidget adds an observer callback in init()
that is never removed.

This commit fixes the leaks by moving initialization of the observer callback to
enter() and removing the callback in exit().

Fixes 0004048

From: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24562 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Scripted/Editor/Editor.py Diff File