Anyway, it's not needed anymore, I moved the cleanup to ReleaseDC, limited to the kind of DCs that wined3d uses, it should be good enough for now.
Wait, does this mean we're destroying the drawable on every ReleaseDC() call? Isn't that going to kill performance?