When applying a color modification to an icon with icon+=[rgb] a temporary version of that icon is created with the color modification applied.
These icons seem to never want to go away and hang around in your RAM until DS closes.
Numbered Steps to Reproduce Problem:
use any icon
run an operation like so: icon+=rgb(rand(0,255),rand(0,255),(rand(0,255))
call this operation as fast as possible, watch as RAM usage for DS builds up.
Code Snippet (if applicable) to Reproduce Problem:
mob
verb
kill_ram()
while(src)
sleep(world.tick_lag)
icon=initial(icon) //refresh the icon, otherwise it will become white and no new permutations will exist.
icon+=rgb(rand(0,255),rand(0,255),(rand(0,255))
Expected Results:
After the atom using this icon is deleted, so is this icon.
Actual Results:
it hangs out in RAM and has a party with all it's friends.
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.)
Unsure, I've never had to do this many operations of this type before.
Workarounds:
None so far. I'm unaware if you're able to delete the icon directly. I've attempted to call del(icon) but it does nothing.
Screwing with the garbage collection cycle has proven extremely problematic in the past. An attempt to deal with a related problem caused havoc during the 508 cycle.
Note that the best option for adding color to an icon is, as of 509, a simple color matrix.
You'll still see some memory growth from the abundance of new appearances, but it won't be as severe. Those too get deleted in a garbage collection cycle. This is also way nicer to the server.