Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Am I addicted to null?

$
0
0

I've taken to nulling every variable and event once they become unneeded as a precaution against leaking memory. Is this overkill and can it affect performance since they require about 30% more lines, space and action?

var num = 1000000;
 
function staticFunct(e){
    var arr = e[objects];
    for(i in arr){
        if(arr[i].numbers > num){
            arr = null;
            e = null;
            return true;
        }
    }
    arr = null;
    e = null;
    return false;
}

Viewing all articles
Browse latest Browse all 8068

Trending Articles