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);Parameters
Section titled “Parameters”| Type | Description |
|---|---|
FiniteShell *shell | The shell from which all buttons will be deleted. |
Code Example
Section titled “Code Example”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);Standard Usage
Section titled “Standard Usage”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.