Prerequisites
MonoGame Version
MonoGame.Framework.Compute.WindowsDX 3.8.3
Which MonoGame platform are you using?
MonoGame Windows Desktop Application (mgwindowsdx)
Operating System
Windows
Description
StructuredBuffers don't seem to release unmanaged resources when disposed, leading to massive memory leakage in unmanaged memory.
Steps to Reproduce
Using the indirect_draw_instances compute example, I changed the Draw() method as such:
`protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
particleBuffer1 = new StructuredBuffer(GraphicsDevice, typeof(Particle), MaxParticleCount, BufferUsage.None, ShaderAccess.ReadWrite); //added
particleBuffer2 = new StructuredBuffer(GraphicsDevice, typeof(Particle), MaxParticleCount, BufferUsage.None, ShaderAccess.ReadWrite); //added
ComputeParticles(gameTime);
DrawParticles();
DrawText();
DrawMousePointer();
particleBuffer1.Dispose(); //added
particleBuffer2.Dispose(); //added
base.Draw(gameTime);
}`
Minimal Example Repo
No response
Expected Behavior
The unmanaged resources should be released when disposed is called, freeing unmanaged memory.
Resulting Behavior

Files
No response
Prerequisites
developbranchMonoGame Version
MonoGame.Framework.Compute.WindowsDX 3.8.3
Which MonoGame platform are you using?
MonoGame Windows Desktop Application (mgwindowsdx)
Operating System
Windows
Description
StructuredBuffers don't seem to release unmanaged resources when disposed, leading to massive memory leakage in unmanaged memory.
Steps to Reproduce
Using the indirect_draw_instances compute example, I changed the Draw() method as such:
`protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.Black);
Minimal Example Repo
No response
Expected Behavior
The unmanaged resources should be released when disposed is called, freeing unmanaged memory.
Resulting Behavior
Files
No response