Open CoderMaurice opened 5 years ago
adam, help!!!
Something must still be holding a reference to the JotView after you close it. double check that you've nil'd all references to the view in your controllers when you close it.
The best way i've found to debug memory problems like this is to use Instruments tool Allocations, and turn on reference counting in it. that'll help track down which reference is holding onto the JotView.
I ran the demo and did two things.
the dealloc method has not been executed and the memory will keep rising.
I modified the saveImage method in ViewController, now the ViewController can be released, but jotview won't. The problem is in the JotView
well, the displayLink in the JotView caused a reference problem
Great find! i've pushed up your fix for the saveImage
issue you found. I also now call [jotView invalidate]
whenever the view controller removeFromParentViewController
. That should kill the displayLink
and allow the view controller to be released whenever the controller is removed.
When I want to close it, [JotView dealloc] will never be executed.