json_encode in the following code snippet seems to be hanging on to strings, leading to an ever growing string tree.
Numbered Steps to Reproduce Problem:
1. run code
2. view memory stats.
3. look for str line in the top section.
Code Snippet (if applicable) to Reproduce Problem:
for (var/i in 1 to 1000)
for (var/k in 1 to 1000)
. = json_encode(list("i" = "[i]", "k" = "[k]"))
world.log << .
Expected Results: (514)
str: 24.9 KB (628)
Actual Results: (515)
str: 51.8 MB (1,046,037)
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Happens in 515.1602.
Happens in 515.1600.
Happens in 515.1599.
Happens in 515.1590.
Does not happen in 514.1589