Bitmap.Save, Huge Memory Leak

前端 未结 5 1076
情歌与酒
情歌与酒 2021-01-16 05:02

I have an application where I am taking a bitmap and compressing it using a GZipStream and sending it over a socket, all in memory. I have tracked down the dirty scumbag mem

5条回答
  •  野的像风
    2021-01-16 05:33

    I don't know much about sockets. However, I know one way to stop a memory leak with the Image class is to freeze the bitmap. Hopefully, this post might provide you with some more information. Could the MemoryStream.Dispose be failing? Thereby, creating a memory leak.

提交回复
热议问题