问题
I have a Windows Universal App which uses several BitmapImage
s. I'm used to wrapping Bitmap
s (in Winforms) in using
s or using Dispose
, but I've discovered that BitmapImage
doesn't have a Dispose
method. Is there any way to release their resources earlier than waiting for the GC to do that?
回答1:
Here's a good solution : Memory consumption of BitmapImage/Image control in Windows Phone 8 . it's like a extension 'Dispose
' method for the BitmapImage
And yes, GC.Collect() is good way ..
来源:https://stackoverflow.com/questions/33108983/dispose-of-a-bitmapimage