microsoft / WPFDXInterop

Repo for WPF DX Interop support
MIT License
307 stars 98 forks source link

While Windows is locked, DoRender constantly making new surfaces #25

Open malixg opened 8 years ago

malixg commented 8 years ago

Any time I lock my computer and come back a few minutes later my application is frozen with an OutOfMemoryException. Nearly every call to DoRender(surface,isNewSurface) has a new surface and isNewSurface = true. I might watch for windows being locked and unsubscribe to CompositionTarget_Rendering, or just not call InteropImage.RequestRender while locked, but I'm hoping there might be a better solution for this.