| 211 | } |
| 212 | |
| 213 | void xode_pool_free(xode_pool p) |
| 214 | { |
| 215 | struct xode_pool_free *cur, *stub; |
| 216 | |
| 217 | if(p == NULL) return; |
| 218 | |
| 219 | cur = p->cleanup; |
| 220 | while(cur != NULL) |
| 221 | { |
| 222 | (*cur->f)(cur->arg); |
| 223 | stub = cur->next; |
| 224 | _xode_pool__free(cur); |
| 225 | cur = stub; |
| 226 | } |
| 227 | |
| 228 | _xode_pool__free(p); |
| 229 | } |
| 230 | |
| 231 | /* public cleanup utils, insert in a way that they are run FIFO, before mem frees */ |
| 232 | void xode_pool_cleanup(xode_pool p, xode_pool_cleaner f, void *arg) |
no outgoing calls
no test coverage detected