Memory management on older iOS

My app is configured for iOS 9.3.5. It runs fine on newer versions of iOS. But when I run it on an actual 9.3.5 device (iPad2 from 2011) it crashes with memory management issues.

In particular, when a specific class is instantiated, the allocation is visible in the stack trace and the init runs. But as soon as I put anything into its instance variables, the deinit runs on that instance and the app crashes.

I put a print statement at the start of the init method. That executes just fine. The next line is where value initializations begin, and that is where the deinit is invoked behind my back. I don't know why it would do this. Do you?

Replies

Could you show the complete init code ?

How do you know deinit starts ?
I don't have an SSCCE for this. Plain vanilla init invocation, as far as I can tell. I know the deinit runs because I overrode it and have a breakpoint in it.