JDK-6592428 : D3D: memory leak on exit because of pSyncQuery
Type:Bug
Component:client-libs
Sub-Component:2d
Affected Version:6u4
Priority:P3
Status:Closed
Resolution:Fixed
OS:windows_xp
CPU:x86
Submitted:2007-08-13
Updated:2010-10-14
Resolved:2007-08-21
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
EVALUATION
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.