iamgreaser / iceball

Open-source rewrite of the VOXLAP version of Ace of Spades.
http://iceball.build
GNU General Public License v3.0
113 stars 32 forks source link

Particle models don't get disposed of? #113

Closed dany-on-demand closed 9 years ago

dany-on-demand commented 9 years ago

I did this to obj_particle

        if not this.model then
            common.model_free(mdl_particle)
            error("this works")
        elseif this.free_model then
            common.model_free(this.model)
            error("stuff")
        end

used the rifle a bit, exploded a few grenades... switched teams all that, left it running in the background for 30 minutes then quit it didn't error once

EDIT: So, as I understand this now, GC is implemented but not all of the code was accustomed to it?

iamgreaser commented 9 years ago

We have garbage collection, so model_free is a no-op now.

If you absolutely positively have to remove something from memory, make sure nothing references it, and then do collectgarbage().

By the way, the first full release which has the GC stuff is 0.2, and the base game blocks out older clients, so you shouldn't have to worry about model_free and whatnot now.