Bugfixing - unsubscribing game related topics, to prevent double calls and leaking references, added offAll method to nc. fixes no rendering bug

This commit is contained in:
logsol 2014-03-31 05:05:32 +02:00
parent 40e396fc23
commit 39f684315b
8 changed files with 57 additions and 19 deletions

View file

@ -224,5 +224,12 @@ function (Exception) {
}
}
NotificationCenter.prototype.offAll = function (tokens) {
for (var i = 0; i < tokens.length; i++) {
this.off(tokens[i]);
};
}
return new NotificationCenter(); // making it singletone
});