When a DC becomes unused, it is moved from activeDCList to passiveDCList to be released later. It will stay in the passiveDCList until a new DC is requested for the same window or the window is destroyed.
In a scenario where several windows are created, shown, and then hidden, the stale DCs will be in the passiveDCList for quite a while. These DC will never be used again, they will be released sooner or later.
Thus we can release all DC from passiveDCList when a request for a new DC is received. It will reduce Java usage of GDI resources.