Make some tests more frienly to MemoryError.
Free memory, unlock hanging threads.
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
index fd874c3..5746c39 100644
--- a/Lib/test/test_gc.py
+++ b/Lib/test/test_gc.py
@@ -357,10 +357,12 @@
             for i in range(N_THREADS):
                 t = threading.Thread(target=run_thread)
                 threads.append(t)
-            for t in threads:
-                t.start()
-            time.sleep(1.0)
-            exit = True
+            try:
+                for t in threads:
+                    t.start()
+            finally:
+                time.sleep(1.0)
+                exit = True
             for t in threads:
                 t.join()
         finally: