title: Multithreaded program memory consumption grows, but objects' size and reference count seemingly do not
body: <p>I am running a multithreaded program, which consumes the more memory the longer it runs.</p>
  
  <p>I tried to inspect what is going on by checking how size of objects and their reference count change over time:</p>
  
  <pre><code>total_obj_size = sum([sys.getsizeof(i) for i in gc.get_objects()])
  total_ref_count = sum([sys.getrefcount(i) for i in gc.get_objects()])
  leaking_obj_count = objgraph.get_leaking_objects()
  </code></pre>
  
  <p>But they stay about the same, there is no growth over time. 
  Where should I look next?</p>
  
  <p>Is gc.get_objects() returns objects from all threads or only the one it is run from? (I run it from main thread)?</p>
  
  <p>Memory consumption returns to normal if threads are terminated (so I can just restart them every x secons), but Is there a way to see why memory consumption grows with modules like gc or objgraph or something else?</p>