我的代码:
let contrastfilter = GPUImageContrastFilter()
contrastfilter.contrast = 1.4
let thresholdImageFilter = GPUImageAdaptiveThresholdFilter()
thresholdImageFilter.blurRadiusInPixels = 16.0
let filterGroup = GPUImageFilterGroup()
filterGroup.addFilter(contrastfilter)
filterGroup.addFilter(thresholdImageFilter)
contrastfilter.addTarget(thresholdImageFilter)
filterGroup.initialFilters = [ contrastfilter ]
filterGroup.terminalFilter = thresholdImageFilter
let resultImage = filterGroup.image(byFilteringImage: image)
执行代码后,我的内存使用量增加了。如何在执行后释放内存?