Mercurial > MadButterfly
diff src/redraw_man.c @ 865:48df0f97f09e
Allocate sh_path_t objects from an elmpool
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Thu, 23 Sep 2010 09:55:37 +0800 |
parents | 6eaeec6806f2 |
children | 9a7ac4487849 |
line wrap: on
line diff
--- a/src/redraw_man.c Wed Sep 22 21:14:06 2010 +0800 +++ b/src/redraw_man.c Thu Sep 23 09:55:37 2010 +0800 @@ -639,6 +639,7 @@ int redraw_man_init(redraw_man_t *rdman, mbe_t *cr, mbe_t *backend) { extern void redraw_man_destroy(redraw_man_t *rdman); + extern int _sh_path_size; extern int _paint_color_size; observer_t *addrm_ob; extern void addrm_monitor_hdlr(event_t *evt, void *arg); @@ -653,6 +654,7 @@ rdman->geo_pool = elmpool_new(sizeof(geo_t), 128); rdman->coord_pool = elmpool_new(sizeof(coord_t), 16); rdman->shnode_pool = elmpool_new(sizeof(shnode_t), 16); + rdman->sh_path_pool = elmpool_new(_sh_path_size, 16); rdman->observer_pool = elmpool_new(sizeof(observer_t), 32); rdman->subject_pool = elmpool_new(sizeof(subject_t), 32); rdman->paint_color_pool = elmpool_new(_paint_color_size, 64); @@ -720,6 +722,8 @@ elmpool_free(rdman->coord_pool); if(rdman->shnode_pool) elmpool_free(rdman->shnode_pool); + if(rdman->sh_path_pool) + elmpool_free(rdman->sh_path_pool); if(rdman->observer_pool) elmpool_free(rdman->observer_pool); if(rdman->subject_pool) @@ -779,6 +783,7 @@ elmpool_free(rdman->coord_pool); elmpool_free(rdman->geo_pool); elmpool_free(rdman->shnode_pool); + elmpool_free(rdman->sh_path_pool); elmpool_free(rdman->observer_pool); elmpool_free(rdman->subject_pool); elmpool_free(rdman->paint_color_pool);