Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32062

WPF Transformation Memory Problem

$
0
0
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.

publicvoid RotateCube()
{
  var rot_axis = newVector3D(0, 1, 0);
  Transform3DGroupgroup = CubeModel.Transform as Transform3DGroup;
  QuaternionRotation3D r = newQuaternionRotation3D(newQuaternion(rot_axis, RotationAngle));
  group.Children.Add(newRotateTransform3D(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.

Viewing all articles
Browse latest Browse all 32062

Trending Articles