You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/10/12 01:12:42 UTC
[jira] [Commented] (CB-4905) CordovaJS on Windows8 has memoryleak
on exec.js
[ https://issues.apache.org/jira/browse/CB-4905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793123#comment-13793123 ]
ASF subversion and git services commented on CB-4905:
-----------------------------------------------------
Commit 668d79fcc89ae04d0102dc27526b07709b9688d8 in branch refs/heads/3.1.x from [~csantana]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=668d79f ]
[CB-4905] CordovaJS on Windows8 has memoryleak on exec.js
> CordovaJS on Windows8 has memoryleak on exec.js
> -----------------------------------------------
>
> Key: CB-4905
> URL: https://issues.apache.org/jira/browse/CB-4905
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaJS, FirefoxOS, Windows 8
> Affects Versions: Master, 3.1.0
> Reporter: Carlos Santana
> Assignee: Carlos Santana
>
> This problem might be present in firefoxos but since I don't have a phone to test, if someone wants to donate a phone for me to test I will be happy to debug and test :-)
> Whenever an exec occurs in windows8 cordova.callbacks[callbackId] increases
> and since the standard functions (callbackSuccess, callbackError) are not run the memory never gets claim back with a delete
> https://github.com/apache/cordova-js/blob/master/lib/windows8/exec.js#L46
> var callbackId = service + cordova.callbackId++;
> // console.log("EXEC:" + service + " : " + action);
> if (typeof success == "function" || typeof fail == "function") {
> cordova.callbacks[callbackId] = {success:success, fail:fail};
> }
> try {
> proxy(success, fail, args);
> }
> the function callbackFromNative: function(callbackId, success, status, args, keepCallback)
> its the one to delete the callback reference:
> https://github.com/apache/cordova-js/blob/master/lib/cordova.js#L217
> if (!keepCallback) {
> delete cordova.callbacks[callbackId];
> }
--
This message was sent by Atlassian JIRA
(v6.1#6144)