Hi
I have create the texture using CVMetalTextureCacheCreateTextureFromImage, It's looks like return a UnsafeMutablePointer<CVMetalTexture?>, and I pass it to metal shader using CVMetalTextureGetTexture. use this way looks like have memory leak, how to release the texture is correct way? I tried call CVMetalTextureCacheFlush but it not working.
Thanks Chengliang
Part of code: var texture: CVMetalTexture? = nil let status = CVMetalTextureCacheCreateTextureFromImage(kCFAllocatorDefault, textureCache, pixelBuffer, nil, pixelFormat, width, height, planeIndex, &texture)
...
encoder.setTexture(CVMetalTextureGetTexture(self.texture), index: 0)