Compile your program on Linux and just run it with valgrind myprog.kexe
👍 1
i
itnoles
12/09/2017, 6:07 PM
Well, I uses Mac OS X.
it happens in NSURLSession with a delegate or callback.
s
Sam
12/09/2017, 8:16 PM
If you're using a block based wrapper around NSURLSession it can be easy to create a circular reference. The basic delegate callback mechanism of NSURLSession uses a weak reference and should not create a memory leak.
In your block wrapper if the block contains a reference to
this
inside of it, it will create a circular reference. You need to make it a weak reference.