]> Pileus Git - grits/commit
Fix memory leaks in tile loading
authorAndy Spencer <andy753421@gmail.com>
Mon, 13 Feb 2012 23:12:20 +0000 (23:12 +0000)
committerAndy Spencer <andy753421@gmail.com>
Tue, 14 Feb 2012 03:16:27 +0000 (03:16 +0000)
commit6ec0202fba35eb878af793ed6086ff928f13ce5b
treef82bb889da3cdd7ab0bdd7ddd9385cd087dd38ce
parent109c5476a68de3a7a3ace77ecc6d30e842dd004f
Fix memory leaks in tile loading

- Splitting a tile could accidentally overwrite a already split tile if
  one (but not all) of the children were garbage collected.

- Garbage collection never actually happened.. because tile always had
  empty children. To fix this a `load' flag was added so that the
  children could be garbage collected as well without having to check
  the data flag which may always be null.

tile->load: set when texture loading has started
tile->data: set when texture loading has finished
src/objects/grits-tile.c
src/objects/grits-tile.h