how to resolve this? .. JS: js_c/xxx.js:869:out of memory

now i make a game with js, but there has memory leak in the js code, how can i decrease memory waste, is there some suggestion?

JS: js_c/xxx.js:869:out of memory

Which version of cocos2d-x you are using? The latest release has fixed lots of memory issues.