I have developed a WPF Application, using BitmapDecoder to save images. While saving images i am getting an "insufficient memory to complete the operation" exception.
The code looks something like this:
BitmapDecoder imgDecoder = BitmapDecoder.Create(mem,
BitmapCreateOptions.IgnoreColorProfile, BitmapCacheOption.None);
I think BitmapDecoder object may be the cause of that exception; how do I dispose of the object?