Never thought about it before. NET development There is a problem of memory can not be released, always think that the GC has handled everything for me. Now GIS two development combined with three-dimensional ball development, did not think that there is such a serious memory growth, quickly memory is not enough, resulting in a variety of system instability. The sphere starts flashing, unable to create the device, OutOfMemory
1. Use the singleton carefully, the single-instance always keeps a reference to a static object, and memory is never released. As a singleton form, the workaround is to set the static reference to null in the Dispose method.
2. Improper use of character objects: too much too long a string, occupy large object heap, and try not to use string Plus, instead of StringBuilder
3. The stream object is not closed. such as file stream, network transport Stream (Httpresponse,ftpresponse)
. NET memory optimization of several experiences