Memory Leak When Pulling JSON from WEB

后端 未结 3 804
遇见更好的自我
遇见更好的自我 2020-12-20 02:57

I\'ve spent days on this and hit it from every angle I can think of. I\'m working on a simple windows 7 gadget. This script will pull JSON data from a remote web server an

3条回答
  •  一整个雨季
    2020-12-20 03:24

    Found this thread trying to find the underlying reason to this problem because I also had a similar problem recently although my memory would increase about 1Mb per minute... I pretty much isolated it to json parsing. Run the ajax command with type: 'text', and you should see that the memory gets cleaned up.

    I found a library json_parse.js which recursively parses the json data using the JS engine (not eval). I manually parse the text data to json in the success callback and this works well.

提交回复
热议问题