title: module level garbage collection in python
body: <p>Let's say I have a module <code>mod_x</code> like the following:</p>
  
  <pre><code>class X:
    pass
  
  x=X()
  </code></pre>
  
  <p>Now, let's say I have another module that just performs <code>import mod_x</code>, and goes about its business. The module variable <code>x</code> will not be referenced further during the lifecycle of the interpreter.</p>
  
  <p>Will the class instance <code>x</code> get garbage collected at any point <strong>except</strong> at the termination of the interpreter? </p>