動画のBitmap生成時にメモリリークしてた?
new Bitmap → CopyFromMemory ではなく、new Bitmap だけで生成するよう変更。
d2dBitmap = new Bitmap(
this._デコードタスク用D2DDeviceContext参照,
new Size2( (int) this.サイズ.Width, (int) this.サイズ.Height ),
- new BitmapProperties( new PixelFormat( SharpDX.DXGI.Format.B8G8R8A8_UNorm, AlphaMode.Premultiplied ) ) );
- d2dBitmap.CopyFromMemory( new IntPtr( scanLine0 ), pitch );
+ new DataPointer( scanLine0, bufferLength ),
+ pitch,
+ new BitmapProperties( new PixelFormat( SharpDX.DXGI.Format.B8G8R8A8_UNorm, AlphaMode.Ignore ) ) );
}
catch( SharpDXException e )
{