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

Garbage collection #97

Closed iamgreaser closed 9 years ago

iamgreaser commented 10 years ago

This would save us a LOT of grief, mostly pertaining to memory leaks and whatnot.

More research is necessary. I think we need to have some metatable shit in there.

iamgreaser commented 10 years ago

Started implementing this. It's actually easier than I thought, although it's a little bit tedious.

iamgreaser commented 10 years ago

pmf/wav/img garbage collection implemented. TODO: map/mus GC. Maps should be easy, but the music will require some care.

iamgreaser commented 9 years ago

OK, this apparently is mostly in there, although maps and music I don't really care all that much about wrt GC.

Crash bugs in 0.1.2-10 have been fixed after some rather serious valgrind sessions.

Should I just close this?

rakiru commented 9 years ago

What's the trouble with GCing music? And maps should be easy, surely? Can there be more than one?

Close it if you think it's unnecessary though; I doubt anyone else is going to get around to it any time soon.

iamgreaser commented 9 years ago

I've found that freeing music tends to be a bit unstable. But the thing is, there really isn't much point in GCing music and maps other than consistency - there's very few of the damn things loaded, and you generally don't unload them (aside from maps, but there's usually only one going at a time anyway).

See #67 .

rakiru commented 9 years ago

For the maps, I was wondering about when a server changes map. If the old one just hangs around, that would be an issue. Sounds, while not really an issue for the base game, could be problematic for custom servers, so an eventual fix would be good.

iamgreaser commented 9 years ago

I'm talking about garbage collection - common.map_free() and common.mus_free() both still exist and still do things.

rakiru commented 9 years ago

Right, yeah, derp. That's not an issue for maps, and I guess anything that does any weird shit with a ton of music can free it itself.

iamgreaser commented 9 years ago

Closing because it's pretty easy to free maps and music by hand... although I'm genuinely not sure about the music but yeah.