This function is used to destroy an animator.
void dg_animator_free(dg_animator_t *animator);
dg_animator_free(animator);
void dg_animator_free(dg_animator_t *animator)
{
if (animator->length > 0) {
free(animator->animations);
free(animator->keys);
}
free(animator);
}