[3.6] bpo-31130: IDLE -- stop leaks in test_configdialog. (GH-3016) (#3018)

Initial patch by Victor Stinner.
(cherry picked from commit 733d0f6)
diff --git a/Lib/idlelib/configdialog.py b/Lib/idlelib/configdialog.py
index 6d8a03b..e634d5f 100644
--- a/Lib/idlelib/configdialog.py
+++ b/Lib/idlelib/configdialog.py
@@ -1856,6 +1856,7 @@
 
     def clear(self):
         "Clear lists (for tests)."
+        # Call after all tests in a module to avoid memory leaks.
         self.untraced.clear()
         self.traced.clear()