Do I to use the function free()
after the use:
TCLIST *list = tcbdbrange();
or using enough :
tclistdel(list);
Do I to free(p)
for: p = (lk_key*) tclistval(list,...)
or tclistdel(list)
delete all elemenst of list ?
Do I to use the function free()
after the use:
TCLIST *list = tcbdbrange();
or using enough :
tclistdel(list);
Do I to free(p)
for: p = (lk_key*) tclistval(list,...)
or tclistdel(list)
delete all elemenst of list ?
Haven't you read any documentation? These are typical questions that should be answered by the docs. As a matter of fact, they are:
Because the object of the return value is created with the function '
tclistnew
', it should be deleted with the function 'tclistdel
' when it is no longer in use.
I interpret that to mean that you don't have to iterate over the list and delete each element individually.