1
我已经搜索谷歌没有这个运气,也许这里有人可以帮助,因为我真的不想注册在MSDN上。C#新浪微博奇怪的错误
我现在每次都会碰到这个事故,我不太清楚是什么原因造成的。
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Microsoft.Xna.Framework.Graphics.DeviceResourceManager.ReleaseAllReferences(UInt64 handle, Boolean dispose)
at Microsoft.Xna.Framework.Graphics.DepthStencilBuffer.ReleaseNativeObject(Boolean disposeManagedResource)
at Microsoft.Xna.Framework.Graphics.DepthStencilBuffer.!DepthStencilBuffer()
at Microsoft.Xna.Framework.Graphics.DepthStencilBuffer.Dispose(Boolean)
at Microsoft.Xna.Framework.Graphics.DepthStencilBuffer.Finalize()}
使用VS2008,C#和XNA 3.1。
编辑:这是处置代码
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
TileSet.Dispose(); // Tileset is no longer needed.
blanksqaure.Dispose(); // Just for testing.
Logo.Dispose(); //D ispose logo.
AudioSystem.Dispose(); // Unload Audio System.
}
需要看到一些代码.... – 2011-05-20 01:22:04
,由于代码已经达到15000行有点艰苦的比赛资产。 – JDJD 2011-05-20 01:37:47
由于GC产生的错误,我们可以看到您的配置代码吗? – soandos 2011-05-20 01:46:26