Wikitude - Bad memory management / memory leaks - ios

I'm using wikitude for my augmented reality mobile app project. My problem is I dont know how to manage app memory before and after resume my app. This is my test result on my xcode5. Every time I resume my app during preview world, memory usage keep increasing.
Why?

You may have abandoned memory. Take a look at this thread as a good starting point. Tips for finding and debugging abandoned memory and heap growth

I got the answer, just update the latest wikitude SDK from github. This happen because of iOS7.

Related

Jetsam kills WebGL application on iOS

I am currently struggling with memory management inside a webgl application on the web, on iOS only.
I keep getting the following error message :
Application 'UIKitApplication:com.apple.Preferences[0xa7c1]' was killed by jetsam.
I understand that Jetsam is the system process responsible for memory management, but the crash occurs while the browser uses around 25% of the device's RAM, which is not that high. I don't have any other open application while running my webGL content. What I don't understand is what Taun Chapman said :
Jetsam monitors memory use and kills applications which are not good memory citizens. A good memory citizen is an application which is willing to give back memory when asked and does not keep asking for more memory.
Well, the app needs more memory in a short time (when unzipping 3D models using workers), I can't continue my app without it! And it crashed at these particular times.
Moreover, I think I have some memory leaks in my app, according to Chrome DevTools I am currently trying to fix. But the browser itself seems to have some leaks too. Thus, fixing mine will just delay the inevitable.
I know the following question is odd, or inappropriate, but do you know if the jetsam "limit" can be increased ? Or if you can add an exception on the currently running WebGL app ?
For your information, I use the Three.js WebGL library and the zip.js library to compress my 3D models.
Yes, I've already read the following question : Why does simple website crash on mobile (iOS Safari and Chrome, at least)?, but the problem does not come from my CSS.
The 10.3.2 version of iOS (released the 15th of May) made Jetsam less aggressive, or at least, the memory is better handled.
https://support.apple.com/en-gb/HT207798

Diagnosing memory leak in Appcelerator titanium iOS iPad app

I am working on an iPad App that is built with Appcelerator Titanium Studio.
The app works great in simulator, but it crashes every now and then in the older models of iPad. So, I decided to see what's happening with the app by letting it run in simulator and using the XCode Instruments to see any leak.
As expected, there appears to be some leaks, this is what I can see in the report:
I have no idea what this thing is reporting back. How do you use this report to find the leak in your app? Has anyone got any experience with this?
memory leaks is all up to your code. There are no specific memory leaks you can just point to. However, there is a pretty good blogpost with some great basic rules you will have to follow to prevent memory leaks.
In case there are any memory leaks in Appcelerator's code, you will need to report it to their JIRA. However, my app for example is pretty big and I haven't encountered any so far. And if there are, they are tiny, as the memory usage is pretty consistent.
http://www.tidev.io/2014/03/27/memory-management/
If you want to locate the memory leak, try "Allocation" instrument.
You can follow this article.

iAd & AdMob Heavy on Memory

I've just completed coding my new game for the iOS platform and now I decided that it is time to integrate iAd/AdMob banners at the bottom of the screen. I have completed the implementation and an iAd is showing up and if it fails then it is replaced by an AdMob banner. This is great, however I checked over the memory consumption of the app and prior to iAd/AdMob integration, my app was running using around 19MB of memory - with the the iAd/AdMob integration, it is running using over 50MB of memory. I have two questions regarding this - are they supposed to be so memory-heavy like this or am I doing something wrong? Secondly, it seems as if these banner views are never getting released from memory. I have tried setting adBannerView = nil followed by [adBannerView removeFromSuperview] but still nothing happens and the memory does not lessen at all. F.Y.I - my game is ARC enabled.
Any help on this matter would be greatly appreciated! Thanks.
The memory growth you are observing is a result of WebKits contribution to the heap. This unfortunate behavior has been the subject of a lot of outrage. You will find similar behavior if you try and load the banners using your own web views. There has also been similar discussions on SO like this one, and this one where developers have been locked in a futile war to attempt to reduce the memory impact of web loading.
I personally haven't used iAds yet but I am very familiar with Google Ad integration on iOS and we saw significant memory increases post-implementation.
TL;DR
That being said you should consider observing the debug memory gauge, simulate a memory warning, and then your usage should drop. In most scenarios I have encountered WebKit has done a decent job of removing its In-Memory cache.
However, If these memory warnings are not handled you should definitely seek to file a bug report.

Apple maps memory footprint

Did anyone had or have problems with the memory footprint (Live Bytes) when using the new Apple maps in an iPad application?
I tested my iPad app with Instruments and it seems the memory allocation jumps to over 70MB when displaying the map (and even 120MB when start zooming) -- while on iOS 5.1 (using Google Maps) the memory footprint is less than 4MB.
Or does anyone have a solution to this issue (reducing the memory footprint when using Apple maps)?
Thanks.
As I commented above, this became an issue required me to bang my head against a wall for some time. The straight answer is, yes this is an issue Apple accepts to be exists but they have some good excuses for that such as newer hardware devices should be able to handle this memory consumption without much pain. However, some people have already logged issues in their system, so there is nothing we can do until they fix it and release a patch.

How to port the awesome PhotoScrollerNetwork in MonoTouch?

I'm trying to port the PhotoScrollerNetwork app to MonoTouch (a much improved version of the iOS 5 Apple PhotoScroller example), but the code is doing things that I'm unable to reproduce in MonoTouch.
https://github.com/dhoerl/PhotoScrollerNetwork
For example the memory management is very difficult to reproduce in MonoTouch, and without it it crashes. The author (dhoerl) wrote in the readme:
v2.0:
- iPad1 and iPhone3GS (with only 256M of memory) were getting killed with no OS warning. So, created an upper limit on cdisk cache usage,
and flush files (to free up memory) when the threshold is hit. Crashes
went away.
Porting the following class in MonoTouch is very complicated:
TiledImageBuilder.m
Maybe there is another, simpler way in MonoTouch to handle the above memory management tricks, due to his GC. Has anybody else tried to port the PhotoScrollerNetwork app and wanna share?
Any suggestion is appreciated,
Thanks.

Resources