There are two methods in the D3DContext class for resource disposal:
- to release default-pool resources only (ReleaseDefPoolResources())
- to release all resources (ReleaseContextResources()), inlcuding those in default pool
ReleaseContextResources is supposed to release all resources including
all default pool ones, but one resource (pSyncQuery) was missed, which
resulted in d3d devices not being released, causing a leak.
The fix is to call ReleaseDefPoolResources() from ReleaseContextResources()
to make sure all default pool resources are released.