mono/MonoGame — pull request #1490 by Discosultan (2013-03-02 17:13:08+00:00)
Title: Removed unnecessary garbage generation in Model.Draw

Problem: Model.Draw method was generating considerable amount of unnecessary garbage by allocating new bone transform array with every call to the method.

Solution: New static field was introduced which replaces the role of bone transforms array. This array is static in order to save memory. We do not need separate instance for each Model because the transforms are set always directly before drawing the Model. At each Draw method call, the array is checked for null and if it is long enough to hold transforms for Model with highest number of bones.