solution to memory leakage in this code
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3968553/does-these-code-has-memory-leakage">does these code has memory leakage??</a>  </p>
</blockquote>



<pre><code>static private       ArrayList   seriesColors      = new ArrayList(); 

public Audiogram(int widthParm, int heightParm) 
            throws Exception 
    { 
        super(widthParm, heightParm); 
        seriesColors.add(new Color(  0,   0, 255)); 

        // Set the default settings to an industrial audiogram 
        setType(INDUSTRIAL_AUDIOGRAM); 
    } 
</code></pre>

<p>This piece of code causes memory leakage. What should be the change.</p>

<ol>
<li>Should i change the static variable into non static.</li>
</ol>

<blockquote>
  <p>Generates audiogram graphs.</p>
  
  <p>This class is mainly used to generate
  the standard audiogram XO graph.</p>
  
  <p>The audiogram graph is normally
  displayed with the highest value at
  the bottom (i.e. -10 on top to 110 on
  the bottom) so that the line goes down
  as an employee's hearing gets worse.</p>
</blockquote>
