Today, I encountered a problem during development: "system. accessviolationexception is not handled.
Message = "try to read or write the protected memory. This usually indicates that other memory is damaged. "
This usually indicates that other memory is damaged. I do not know whether you have encountered this error because users repeatedly write or open files,
This error occurs when memory resources are not released in time. This error cannot be tracked and must be forcibly released!
There is no forcible release method. The underlying COM component controls the addition and release of Objects Based on the number of times your process calls the component (the object release will be delayed,
Com itself ). Generally, the method is called to force garbage collection or the method that AO comes with to recycle objects, and the effect is not obvious. The solution is as follows:
1. Restart IIS. (I solve it in this way .)
2. Close the vs process and exit vs2005.
3. If the above method does not work, you canProgramTo forcibly release com resources, call the marshal. releasecomobject () method
Objects that are no longer in use are released. See http://hi.baidu.com/murphy1314/blog/item/a61bf0996e12850d6e068c3d.html for details