facebookresearch / pysparnn

Approximate Nearest Neighbor Search for Sparse Data in Python!
Other
915 stars 146 forks source link

the memory is leak when using pickle.load(MultiClusterInde object) #30

Open liuchenbaidu opened 4 years ago

liuchenbaidu commented 4 years ago

python: 3.6 os: ubuntu numpy:1.16.1 scipy:1.0.0

cp = ci.MultiClusterIndex(features, data_to_return) with open('cluterIndex.bin', 'wb') as fh_out: pickle.dump(cp, fh_out)

obj_file = 'cluterIndex.bin' def test_memory_leak(objfile): while True: with open('cluterIndex.bin', 'rb') as file: cp =pickle.load(file_) if name == 'main': test_memory_leak(obj_file )