Fixed memory leaks in spine-c