justinstenning / Direct3DHook

DirectX Capture and Overlays by using Direct3D API hooks
http://spazzarama.com/2011/03/14/c-screen-capture-and-overlays-for-direct3d-9-10-and-11-using-api-hooks
MIT License
580 stars 178 forks source link

Fix for Issue #5: Memory leak in captured program #6

Closed bitterskittles closed 11 years ago

bitterskittles commented 11 years ago

Changed return value of BaseDXHooks.ReadFullStream to IEnumerable< byte[] > Removed MarshalByRefObj base from Screenshot Changed parameters of CaptureInterface.SendScreenshotResponse to (Guid, byte[][])

bitterskittles commented 11 years ago

I decided to not change CaptureInterface.SendScreenshotResponse. Screenshot gets binaryserialized when it crosses appdomains, and it doesn't have any methods so it doesn't have to be MarshalByRefObj. So I'll drop the base and add SerializableAttribute

justinstenning commented 10 years ago

See the fix for #7 to correctly address this