pandap / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

"SlimDX.Direct3D11.Device.CreateWithSwapChain(...)" causes a memory leak #900

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using SlimDx (January 2012 release for .Net 2.0 x86) with DX11 and i have a 
memory leak problem.
After a lot of sessions of debugging and memory profiling i can explain that my 
idea is that memory leak (increment of 8 MB on every call) is caused by 
"Direct3D11.Device.CreateWithSwapChain(...)" method.
I use it in this way:

SlimDX.Direct3D11.Device.CreateWithSwapChain(
                    DriverType.Hardware,
                    DeviceCreationFlags.None,
                    new SwapChainDescription()
                    {
                        BufferCount = 1,
                        Usage = Usage.RenderTargetOutput,
                        OutputHandle = Handle,
                        IsWindowed = true,
                        ModeDescription = new ModeDescription(0, 0, new Rational(60, 1), Format.R8G8B8A8_UNorm),
                        SampleDescription = new SampleDescription(1, 0),
                        Flags = SwapChainFlags.AllowModeSwitch,
                        SwapEffect = SwapEffect.Discard
                    },
                    out device,
                    out swapChain);

Original issue reported on code.google.com by franci...@gmail.com on 8 Oct 2013 at 1:21