问题
Is it possible that there will still be leaks when running my app on an iPhone even if the simulator has absolutely none??
回答1:
If you run your app through Instruments, and there don't appear to be any memory leaks, you're probably okay. Make sure to thoroughly test the application, to cover as many scenarios and as much code as possible.
No software is perfect, so there's always a chance, but if you are thorough with testing, you should be fine.
回答2:
It is possible that some memory leaks to be present when tested on a real device. Since the firmware of the device is different than of the simulator, and also due to the fact that simulator is a software, that won't always be perfect as andy suggested, you have to test for memory leaks in the device itself before submitting. Simulator may not always catch all the memory leaks.
回答3:
My first answer would be: Yes, always. All that matters is the hardware in the end. The simulator is just there to reduce the time between iterations when testing.
My second answer would be: it's possible because there's no way to prove that an app won't leak memory. See also: the halting problem.
来源:https://stackoverflow.com/questions/2197768/iphone-simulator-leaks-vs-iphone-device-leaks