setTimeout causing memory leak
<pre><code>var SetInactivityTimeOut = function () {
    try {
        var TimeoutInterval = parseInt(10, 10);

        var PreviousTimeStamp = Math.round(new Date().getHours() * 60 + new Date().getMinutes());

        if (TimeoutInterval === 0) return;

        TimeoutInterval = TimeoutInterval * 60 * 1000; //Converting to milisecond
        var TimeOutObj;
        if (TimeOutObj != null &amp;&amp; TimeOutObj != undefined) {
            clearTimeout(TimeOutObj);
        }
        //Ti.API.info('TimeOutObj---'+TimeOutObj);
        TimeOutObj = setTimeout(function () {
            open the main page
        },TimeoutInterval);

    } catch (e) {
        error(e);
    }
}
</code></pre>

<p>This is the function i am using on every button click, once 10 minutes idle time has been finished, it opens back the index page. But when i try to login the application from there, its very slow and application gets hanged. </p>

<p>I am using this code in Mobile. I just wanted to know is there any memory leak in the way the function is written.</p>
