Add destroy helper
This commit is contained in:
@@ -295,3 +295,17 @@ NeatBarLayer *neat_bar_layer_create() {
|
||||
s_current_neat_bar = neat_bar;
|
||||
return neat_bar;
|
||||
}
|
||||
|
||||
void neat_bar_layer_destroy(NeatBarLayer *neat_bar) {
|
||||
if (neat_bar == NULL) {
|
||||
return;
|
||||
}
|
||||
bitmap_layer_destroy(neat_bar->down_layer);
|
||||
bitmap_layer_destroy(neat_bar->select_layer);
|
||||
bitmap_layer_destroy(neat_bar->up_layer);
|
||||
layer_destroy(neat_bar->main_layer);
|
||||
if (s_current_neat_bar == neat_bar) {
|
||||
s_current_neat_bar = NULL;
|
||||
}
|
||||
free(neat_bar);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user