Vitaliy Margolen : d3d9: VertexDeclaration and VertexShader should keep reference to the parent device object .