简体   繁体   中英

“Message sent to deallocated instance” error

I'm optimizing an old app for iOS 7, and have to deal with non-ARC code, with which I have never dealt before. The trouble is with in-app purchases, with the library MKStoreKit. The app is using an old and modified version of it. I can't use the newer version, because there is no access to the server. The line of code, which is causing an error is:

[MKStoreManager sharedManager];

The error itself is:

-[MKStoreManager retain]: message sent to deallocated instance 0x145e6ba0

I used NSZombie, this is what I got: 在此处输入图片说明

So, any help would be greatly appreciated. I've already spent three days, trying to solve this problem.

UPDATE: MKStoreManager.m: http://pastebin.com/ZppTkxmN

MKStoreManager.h: http://pastebin.com/TJVM7UdN

The line, causing the error: 在此处输入图片说明

Why don't you download the ARC Version of MKStoreKit from this link and replace the new library in your project and have fun.

https://github.com/MugunthKumar/MKStoreKit

Hope it Helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM