Found a very significant memory leak in MotionBuilder 2010 when adding keys to the animated double property – FBPropertyAnimatableDouble.
Here is my test property is intended to print out the quality of the object. Althoughin this case, the appointment of property is not so important.
Initialize this property in the object’s constructor
FBPropertyPublish (this, Quality, "Quality", NULL, NULL);
Before working with it, prepare an animation curve
Quality.SetMinMax (0.0, 1.0);
And it is now be possible, and add some value
Quality.GetAnimationNode () -> KeyAdd (time, & value);
This is the option of adding keys to the property generates a very large-scalememory leaks! For example, after 9 thousand frames of adding keys in this way,Mobu eats about 2.5 GB of RAM!
Out of this situation is to add the key directly on the curve:
HFBFCurve fcurve = Quality.GetAnimationNode () -> FCurve;
fcurve->KeyAdd (time, quality);
So everything is working properly and without unnecessary leaks.