http://bugs.winehq.org/show_bug.cgi?id=7696
------- Additional Comments From stefandoesinger@gmx.at 2007-19-03 08:38 ------- Yes, this is a refcounting issue.
SetFVF creates a vertex declaration for the fvf, but it incorrectly AddRefs the d3d9device. This creates a circular reference and the device isn't freed properly.
I made a fix for that some time ago, but it was incorrect and I didn't have time to persue fixing that yet.