Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Appcelerator Android removing child views for managing memory

$
0
0

Hi, In my view having lot of views around 60 to 80 views and from navigating from one .js class to another .js class , i am removing child views from the parent view for android memory manage but having lot of views its taking 5-7 seconds and meantime its showing blank screen and then displaying next screen. Could any know how to reaving all the child views with out loop or improving the deleting views process to avoid blank screen and my code is as follows

i am calling clearObjMemory() is only once and removeChildrens() is called till loop completion, thanks in advance.

/******** Garbage collection ************/ function removeChildrens(objeto) { for (i in objeto.children) { var child = objeto.children[0];

    removeChildrens(child);

    if (child) {
        objeto.remove(child);
        child = null;
    }
}

}

/** * Releasing object memory */

function clearObjMemory() {

if ($.index != null) {

    removeChildrens($.index);
}

}


Viewing all articles
Browse latest Browse all 7655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>