Skip to content

finite_button_delete_all

The finite_button_delete_all function removes all FiniteBtn instances from a FiniteShell, freeing their memory and clearing the button array.

void finite_button_delete_all(FiniteShell *shell);
TypeDescription
FiniteShell *shellThe shell from which all buttons will be deleted.
FiniteBtn *btn = finite_button_create(shell, select_cb, NULL, NULL, NULL);
FiniteBtn *btn2 = finite_button_create(shell, select_cb, NULL, NULL, NULL);
finite_button_delete_all(shell);

The shell must be valid and contain at least one button. This function frees all buttons and their associated relations data. After execution, FiniteShell.btns is set to NULL and FiniteShell._btns should be considered 0.