Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

is there no way to free memory

i have an app with a scrollable view with 15 images and an index. when i open the app on my ipad the available memory is 132. just pulling up the index drops it to 72. flipping through a few pages drops it down to 2 and then it crashes.

am i doing something wrong? i'll post the code if necessary but as stated its just a very simple scrollable view with a scroll view index. Help would be greatly greatly appreciated.

— asked November 10th 2010 by sean oreilly
  • crash
  • free
  • leak
  • memory
  • scrollable
  • Assuming that the code you're using to implement this is pretty much similar to what's provided in Kitchen Sink, the next thing that comes to mind as possible suspects would be the sizes of those resource image files you're adding into the view object. Some code would be cool as well to properly diagnose.

    — commented November 15th 2010 by Brandon Xavier
  • thanks, sorry i was never alerted to your comment.

    it is a standard simple scrollable view with 1024x768 images and i use removeView to try to keep only 3 views in memory at a time (doesnt work though).

    list is the array of views

    for (var t=0; t<list.length; t++){
    for (var s=0; s<3; s++){

    test.currentPage = 1;

    — commented November 20th 2010 by sean oreilly
  • I'm just starting a project that was originally done using web app tech using phone gap, I was hoping titanium would be a good solution, but it seems like memory management is an issue here as well. I guess there is no way around object-c - unless someone here can convince me this can be resolved without a bunch of hacks. I miss action script.

    — commented December 1st 2010 by raymond wiggins

8 Answers

  • Seems similar to this bug: http://developer.appcelerator.com/question/46061/serious-memory-leak

    I also have the same issue, every scroll is decreasing the Free memory available… Unless this is fixed soon, this makes the scrollableView component useless.

    If anyone from the dev. team is reading this, what's the best way to tackle this please?


    — answered November 22nd 2010 by Brice Lechatellier
    1 Comment
    • I forgot to mention the issue is 1.5.0 only, memory seems ok on 1.4.2, but I had to move to 1.5.0 to fix other bugs with scrollableViews as well.

      — commented November 22nd 2010 by Brice Lechatellier
  • the crashing i was talking about above was on an ipad. i just realized that the app runs perfectly on the iphone4. while the available memory decreases significantly it never crashes on the iphone using the exact same resources. can anybody tell me why? thanks

    — answered November 13th 2010 by sean oreilly
  • This could be due to an iPhone4 having twice the RAM of an iPad.

    • iPhone4 has 512M RAM
    • iPad has 256M RAM

    Apple may need to launch a new iPad with 512M to get fast app switching and multitasking working smoothly in iOS 4.2

    — answered November 13th 2010 by Tom Campbell
    1 Comment
    • thanks

      — commented November 15th 2010 by sean oreilly
  • does anyone from appcelerator care enough to respond? im about to transition back to objective C if i cannot solve this. thanks

    — answered November 15th 2010 by sean oreilly
  • I agree, memory management is very disappointing in Titanium. You cannot imagine how it' hard to tell client 'sorry, we cannot finish your project because of SDK failure'. You are investing millions so HIRE SOMEONE TO FIX IT!! This is critical bug.

    — answered November 24th 2010 by Vitali Virulaine
  • I have blogged my answer, have a look


    — answered February 3rd 2011 by Shakil Bharucha
  • Same here, I am big disappointed with the Titanium background worker, memory management, threading, packaging etc. Its really hard to tell client 'sorry, we are taking time because of SDK failure'. Titanium is having critical bugs.

    — answered August 31st 2011 by SUBHASH CHANDRA
  • This issue should be fixed in the 1.7 release. I have an early release of it an it appears to fix this problem.

    — answered May 25th 2011 by Mike Tyranski
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.