Hi! I'm trying to execute some kernels multiply times, but encoder creation, execution and deallocation called from different places, so i can't just put it into @autoreleasepool. Then i try to release command buffer manually nothing happens. Sample:
In result of this code program just eat all available memory.
How can i fix this issue?
Code Block objective-cfor (int32_t i = 0; i<100000; ++i){ _commandBuffer = [_commandQueue commandBuffer]; _encoder = [_commandBuffer computeCommandEncoder]; ... setup encoder and execute [_encoder release]; [_commandBuffer release];//encoder successfully released, but buffer still present and retain count = 1 _encoder = nil; _commandBuffer = nil;}
In result of this code program just eat all available memory.
How can i fix this issue?