GPUImage。如何清理内存使用?

时间:2017-02-16 16:17:44

标签: ios swift gpuimage

我的代码:

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)

执行代码后,我的内存使用量增加了。如何在执行后释放内存?

0 个答案:

没有答案