Fixed a memory leak with colorSpace