For performance reasons, we recommend that you release the frame just before you call the IDXGIOutputDuplication::AcquireNextFrame method to acquire the next frame. When the client does not own the frame, the operating system copies all desktop updates to the surface. This can result in wasted GPU cycles if the operating system updates the same region for each frame that occurs.
I don't use this project but was looking for examples and noticed this.
According to the Microsoft documentation you should be calling ReleaseFrame just before AcquireFrame to prevent GPU resources being wasted.
See: https://msdn.microsoft.com/en-us/library/windows/desktop/hh404623(v=vs.85).aspx
https://github.com/hecomi/uDesktopDuplication/blob/8434d803bb1422a7e75855383f5c3ee3d3512c6e/Plugins/uDesktopDuplication/uDesktopDuplication/Duplicator.cpp#L284