Skip to content

Commit

Permalink
removed manual garbage collection management (resolves #2125)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Jun 27, 2016
1 parent 9b52f7d commit 31f404e
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion cellprofiler/analysis.py
Expand Up @@ -5,7 +5,6 @@
import Queue
import cStringIO as StringIO
import collections
import gc
import logging
import multiprocessing
import os
Expand Down
2 changes: 0 additions & 2 deletions cellprofiler/modules/tests/test_exporttodatabase.py
Expand Up @@ -2,7 +2,6 @@
'''

import base64
import gc
import numpy as np
import os
import PIL.Image as PILImage
Expand Down Expand Up @@ -1822,7 +1821,6 @@ def callback_handler(caller, event):
module.directory.custom_path = output_dir

def finally_fn():
gc.collect()
for filename in os.listdir(output_dir):
os.remove(os.path.join(output_dir, filename))

Expand Down
1 change: 0 additions & 1 deletion cellprofiler/modules/tests/test_loadimages.py
Expand Up @@ -2,7 +2,6 @@
"""

import base64
import gc
import glob
import hashlib
import os
Expand Down
2 changes: 0 additions & 2 deletions cellprofiler/modules/tests/test_mergeoutputfiles.py
@@ -1,6 +1,5 @@
'''test_mergeoutputfiles.py - test the MergeOutputFiles module'''

import gc
import os
import tempfile
import unittest
Expand Down Expand Up @@ -29,7 +28,6 @@ def execute_merge_files(self, mm):

M.MergeOutputFiles.merge_files(output_file, [x[1] for x in input_files])
m = cpmeas.load_measurements(output_file)
gc.collect()
os.close(output_fd)
os.remove(output_file)
for fd, filename in input_files:
Expand Down
2 changes: 0 additions & 2 deletions cellprofiler/modules/tests/test_untangleworms.py
Expand Up @@ -3,7 +3,6 @@
import StringIO
import base64
import bioformats
import gc
import os
import tempfile
import unittest
Expand Down Expand Up @@ -273,7 +272,6 @@ def setUp(self):
self.filename = tempfile.mktemp(".mat")

def tearDown(self):
gc.collect()
if os.path.exists(self.filename):
os.remove(self.filename)

Expand Down
3 changes: 0 additions & 3 deletions cellprofiler/pipeline.py
Expand Up @@ -4,7 +4,6 @@

import bisect
import csv
import gc
import hashlib
import json
import logging
Expand Down Expand Up @@ -1831,7 +1830,6 @@ def group(workspace):
should_write_measurements = True
grids = None
for module in self.modules():
gc.collect()
if module.should_stop_writing_measurements():
should_write_measurements = False
else:
Expand Down Expand Up @@ -1980,7 +1978,6 @@ def run_image_set(self, measurements, image_set_number,
should_write_measurements = True
for module in self.modules():
print "Running module", module.module_name, module.module_num
gc.collect()
if module.should_stop_writing_measurements():
should_write_measurements = False
workspace = cpw.Workspace(self,
Expand Down
2 changes: 0 additions & 2 deletions cellprofiler/tests/test_measurements.py
Expand Up @@ -2,7 +2,6 @@
"""

import base64
import gc
import os
import sys
import tempfile
Expand Down Expand Up @@ -784,7 +783,6 @@ def test_13_01_load_matlab(self):
self.assertEqual(len(values), 1)
self.assertAlmostEqual(values[0], 34.580433355219959)
finally:
gc.collect()
if m is not None:
del m
os.unlink(name)
Expand Down
2 changes: 0 additions & 2 deletions cellprofiler/worker.py
Expand Up @@ -122,7 +122,6 @@ def aw_parse_args():
import random
import zmq
import cStringIO as StringIO
import gc
import traceback
from weakref import WeakSet

Expand Down Expand Up @@ -397,7 +396,6 @@ def do_job(self, job):
if should_process:
abort = False
for image_set_number in image_set_numbers:
gc.collect()
try:
self.pipeline_listener.image_set_number = image_set_number
last_workspace = current_pipeline.run_image_set(
Expand Down

0 comments on commit 31f404e

Please sign in to comment.