Fixed memory leaks of CubeMap