Hi, I'm writing a program at the moment that runs fine, but when it exits i get the following message:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at _cexit()
at <CrtImplementationDetails>.LanguageSupport._UninitializeDefaultDomain(Void* cookie)
at <CrtImplementationDetails>.LanguageSupport.UninitializeDefaultDomain()
at <CrtImplementationDetails>.LanguageSupport.DomainUnload(Object source, EventArgs arguments)
at <CrtImplementationDetails>.ModuleUninitializer.SingletonDomainUnload(Object source, EventArgs arguments)
Does anyone have any idea what might cause this error? I'm using VS2010 on win-7 if that helps narrow it down.
[EDIT]
I removed a scoped_ptr that was at file scope, this seemed to be causing the error. Is there any reason why one shouldn't do such a thing?
Not intentionally anyway, i've looked through the config options in vs and there doesn't seem to be anything suspect (CLR support is disabled). Is there some magic that needs to be done to prevent Visual studio from using CLI?