MCPcopy Create free account
hub / github.com/acl-dev/acl / tpl_release

Function tpl_release

app/wizard/tpllib.cpp:411–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411void tpl_release(tpl_t *tpl)
412{
413 int i;
414
415 /* Free nodes */
416 while (tpl->head != NULL)
417 {
418 tpl_node_t *deleted = tpl->head;
419 tpl->head = tpl->head->next;
420 destroy_node(deleted);
421 }
422
423 /* Free any added content */
424 while (tpl->added_head != NULL)
425 {
426 tpl_node_t *deleted = tpl->added_head;
427 tpl->added_head = tpl->added_head->next;
428 destroy_node(deleted);
429 }
430 /* Free field cells */
431 for (i = 0; i < HASH_TABLE_SIZE; i++)
432 {
433 tpl_fcell_t *fc = tpl->fields[i];
434
435 while (fc != NULL)
436 {
437 tpl_fcell_t *deleted = fc;
438 fc = fc->next;
439 destroy_fcell(deleted);
440 }
441 }
442 /* Free sections including added content */
443 while (tpl->first != NULL)
444 {
445 tpl_tcell_t *deleted = tpl->first;
446 tpl->first = tpl->first->next;
447
448 /* This will call tpl_release() recursively */
449 destroy_tcell(deleted);
450 }
451}
452
453tpl_t* tpl_alloc(void)
454{

Callers 5

destroy_tcellFunction · 0.70
tpl_constructFunction · 0.70
tpl_freeFunction · 0.70
tpl_loadFunction · 0.70
tpl_set_section_exFunction · 0.70

Calls 3

destroy_nodeFunction · 0.70
destroy_fcellFunction · 0.70
destroy_tcellFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…