title: Trying to track down a Silverlight memory leak that only happens in browsers
body: <p>This is an odd one.  I am making a app that is kind of a game, and I wanted to have a shooting starburst effect.  I made it one evening and it all worked well, until I noticed that my browser was eating over 300 megs of ram, eating 1 meg every 5 seconds, mainly when the starburst would happen.</p>
  
  <p>Here is an example stripped down to just the starburst:
  <a href="http://www.sizzln.com/example.htm" rel="nofollow noreferrer">http://www.sizzln.com/example.htm</a>  </p>
  
  <p>First thought, I am not removing the objects or still have references somewhere.  I am placing each generated star into a Canvas, but I am removing old starts every 3 seconds.  I do have a lot of DoubleAnimations as well, but I even have a callback to set everything to null.</p>
  
  <p>Here is the weird part, if I convert it to WPF it doesnt happen, if I run it inside of Silverlight Spy 3, <strong>it doenst happen</strong>.  If I take a Heap Dump using WinDbg and SOS.dll, it reports that it should only be using between 1.8 and 3 MBs of ram.</p>
  
  <p>I have the GC running every 3 seconds to cleanup, but it never has any effect.  I can see in the heapdump that many objects are now deleted, and I always get back to 1.8 meg or so after a GC, but the memory shown in Task Manager just keeps going up.</p>
  
  <p>I dont know what to do, I think I am carefully removing the objects unless my Heap is not being honest.</p>