I save a screenshot of the current image on the computer:
Rectangle bounds = Screen.GetBounds(Point.Empty); using (var bitmap = new Bitmap(bounds.Width, bounds.Height)) { using (Graphics g = Graphics.FromImage(bitmap)) { g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size); } using (var mss = new MemoryStream()) { bitmap.Save(mss,ImageFormat.Gif); } }
And this memory symbol is in this code:
bitmap.Save(mss,ImageFormat.Gif);
Shouldn't using using everything I use?
Why am I still getting a very high memory when shooting a large number of photos and the memory is not coming back?
Thanks!
source share