When I run my app from Xcode, it is clear that I have a memory leak:
When I present a custom ViewController the memory increases, but when I dismiss it it does not go back down.
So I also checked using Instruments' Allocation tool, but that tells a different story:
As you can see, Instruments shows spikes when I present that ViewController, but memory usage drops back to previous levels when it has been dismissed.
I have checked my code at least 15 times and I personally cannot find any memory leaks and thus agree with Instruments. I also implemented the deinit function in all my objects that would get allocated like so:
deinit {
print("Deinnited \(id)")
}
And all objects printed out to the console as expected.
What could be going on? I am using:
- iOS 9.0
- XCode Version 7.0 (7A220)
- Swift 2.1
Both the schemas for Run and Profile is in "debug"



