fixed memory leak in graph cut unit test
Merge pull request #2341 from Jiaolong/graph_cut

fixed memory leak in graph cut unit test