Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Are you using unmanaged code? If you are not using unmanaged code, according to Microsoft, memory leaks in the traditional sense are not possible.</p> <p>Memory used by an application may not be released however, so an application's memory allocation may grow throughout the life of the application.</p> <blockquote> <p>From <a href="http://support.microsoft.com/kb/318263" rel="noreferrer">How to identify memory leaks in the common language runtime at Microsoft.com</a></p> <p>A memory leak can occur in a .NET Framework application when you use unmanaged code as part of the application. This unmanaged code can leak memory, and the .NET Framework runtime cannot address that problem.</p> <p>Additionally, a project may only appear to have a memory leak. This condition can occur if many large objects (such as DataTable objects) are declared and then added to a collection (such as a DataSet). The resources that these objects own may never be released, and the resources are left alive for the whole run of the program. This appears to be a leak, but actually it is just a symptom of the way that memory is being allocated in the program.</p> </blockquote> <p>For dealing with this type of issue, you can implement <a href="http://msdn.microsoft.com/en-us/library/b1yfkh5e(VS.71).aspx" rel="noreferrer">IDisposable</a>. If you want to see some of the strategies for dealing with memory management, I would suggest searching for <em>IDisposable, XNA, memory management</em> as game developers need to have more predictable garbage collection and so must force the GC to do its thing.</p> <p>One common mistake is to not remove event handlers that subscribe to an object. An event handler subscription will prevent an object from being recycled. Also, take a look at the <a href="http://msdn.microsoft.com/en-us/library/yh598w02(VS.80).aspx" rel="noreferrer">using</a> statement which allows you to create a limited scope for a resource's lifetime.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload