title: How can I investigate a memory leak better in NetBeans
body: <p>I'm writing a web spider. It works well except there seems to be a memory leak. The program will run fine for about 15 minutes and then it will crash.</p>
  
  <p>If I monitor it using the "Profile" function in NetBeans, I can see that the memory is increasing over time until eventually I get a <code>java.lang.OutOfMemoryError</code> and the program crashes completely.</p>
  
  <p>The image below shows snapshots of the memory of objects used after one minute and after 15 minutes (right before it crashes.) Is there any way to tell where these objects (my main culprits are <code>byte[]</code> and <code>char[]</code>) are being created or what is still referencing them (and therefor preventing them from being destroyed by the garbage collector)?</p>
  
  <p>Or do I have no idea what I'm talking about?</p>
  
  <p><img src="https://i.stack.imgur.com/thXU2.png" alt="alt text"></p>
  
  <p>Thanks, I appreciate the help.</p>