开发者

WPF Can you clear video memory?

I have a very rich media based application built in WPF, and Im using lots and 开发者_C百科lots of different PNG images to add animations and materials to 3D objects, as well as 2D animations.

I have noticed that quickly the video memory fills up, and Im looking into trying to clear it.

I don't seem to be able to do anything through C# to force the video memory to get cleared, so Im wondering if a normal GC on objects that reference the graphics (BitmapImage objects) will clear out the Video Memory?

Thanks a lot!


Ok, so what I ended up finding out

(via help here: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/181da889-31a2-4e4c-b87e-d864577a41d4 )

was that I needed to de-reference my static lists of BitmapImages in order to clear them out of video memory.

I was keeping them around and making the assumption that when no materials were referencing the bitmaps, then the bitmaps would be removed from the video memory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜