Fix chunk unload memory leak
parent
21ca700626
commit
9542324811
|
@ -102,5 +102,5 @@ void entity_view_update_chunk_texture(entity_view_tbl *map, uint64_t ent_id, voi
|
|||
void entity_view_remove_chunk_texture(entity_view_tbl *map, uint64_t ent_id) {
|
||||
entity_view *view = entity_view_tbl_get(map, ent_id);
|
||||
if (view->kind != EKIND_CHUNK) return;
|
||||
blocks_remove_chunk_tex(view->tex);
|
||||
blocks_remove_chunk_tex(ent_id);
|
||||
}
|
|
@ -15,6 +15,8 @@ int32_t tracker_read_remove(librg_world *w, librg_event *e) {
|
|||
} else {
|
||||
entity_view_mark_for_removal(&view->entities, entity_id);
|
||||
}
|
||||
|
||||
blocks_remove_chunk_tex(entity_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue