WPF Transformation Memory Problem
Hi everybody,
I was testing if using WPF could be a good solution for my application.
In the application I want to apply transformations to several 3D Models.
Now the problem is that the memory usage was increasing when the application was running.
I tried to find the cause for the memory leak and reduced the program to a simple rotation function for a cube.
public void RotateCube()
{
var rot_axis = new Vector3D(0, 1, 0);
Transform3DGroup group = CubeModel.Transform as Transform3DGroup;
QuaternionRotation3D r = new QuaternionRotation3D(new Quaternion(rot_axis, RotationAngle));
group.Children.Add(new RotateTransform3D(r));
}
The memory usage is increasing when this function is called so the problem must be in these lines of code.
I would be glad if someone can give me a hint what I am doing wrong.
I am using Windows XP, .Net Framework 4.0
Thank you in advance.