- Home /
Memory leaks on ios
Hi guys,
i'm currently working on my first ios game. I'm doing some memory leak test with xcode and it seems that Prime31 Storekit and RevMob for unity is creating a bunch of memory leaks. I don't want my app to have leaks and i don't know what i can do to avoid them. (I'm a beginner in Objective-C so that is why i'm using plugin, but I understand reference counting)
Also, even with an empty unity project, there's always a 16 bytes leak at startup : IphoneNewLabelAllocator:Allocate. I'm working with unity 3.5.
Is it normal to have a bunch of leaks because of unity, prime31 store kit or revmob?
P.S. I tested revmob alone and prime31 storekit alone and there's a bunch of memory leaks. Unfornately it would have be easier to resolve it if the leaks was due to my game coding.
(Sorry for my bad english! xD)
Thanks in advance!
EDIT: Ok the leaks doesn't come from plugins. I found that each time Unity/Mono send a message to Xcode(so the objective-c) there's a leak: mono_dl_open 16 bytes.
So my question now is how do i avoid that? Is it possible?
$$anonymous$$ono will not be talking to xcode in your shipping title, so I don't think that this is a problem. If it is a problem, then how many memory leaks of 16 bytes do you get a second? How long will it be before these leaks create any kind of problem? (Note, I have helped probably over 100 $$anonymous$$ms ship iOS games and I have yet to see a memory leak of any real significance.)
Im only getting leaks when i initialize revmob and in-app purchase. And each time i show an ad and also when user request a purchase. So the leaks isnt happening while playing. Its happening only on startup and each time user purchase items. What do you mean by the mono isnt talking to xcode(objective-c) on release build? How does unity communicate with the storekit for example? I don't know if i'm checking leaks the right way. After building the game, i open an xcode instrument and choose my game as target. Should i use play in profile ins$$anonymous$$d than in build inside xcode?
In fact, does apple will reject my game if theres some leaks that isnt growing each second but only when i call some methods from my script inside unity for the ads and in-app purchase?
So many questions my bad!
You said that the alleged leak happens when Unity/$$anonymous$$ono talk to XCode. When you make your final game and upload to Apple servers there is no XCode for the game to talk to. I don't think Apple will apply memory leak tests and refuse to publish your game. I'd sooner put money on XCode not knowing enough about how the plugins and Unity and XCode talk, and gives you a false positive. If the game crashes out of memory after playing for 3 $$anonymous$$utes then you have a problem. If it plays for 24 hours without crashing then is a memory leak a problem? Why's the forum and Answers not full of people complaining about memory leaks?
Your answer
Follow this Question
Related Questions
Memory Allocation Continues to Grow? iOS. 4.6.3 0 Answers
iOS VideoPlayer doesn't unload temp RenderTexture in 2019 0 Answers
iOS app's storage usage (app's size after installation) 0 Answers
"stream from disc" WAV/AIFF file allocates tons of memory 0 Answers
Phone App(not game) : should I load UI panels as assets or load it as new scene? 0 Answers