fixed memory leak when segmenting RGB/Depth