diff options
Diffstat (limited to '')
-rw-r--r-- | src/Tag.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Tag.cxx b/src/Tag.cxx index b473c367e..7853f0a2f 100644 --- a/src/Tag.cxx +++ b/src/Tag.cxx @@ -133,6 +133,22 @@ void tag_lib_init(void) } void +Tag::Clear() +{ + time = -1; + has_playlist = false; + + tag_pool_lock.lock(); + for (unsigned i = 0; i < num_items; ++i) + tag_pool_put_item(items[i]); + tag_pool_lock.unlock(); + + g_free(items); + items = nullptr; + num_items = 0; +} + +void Tag::DeleteItem(unsigned idx) { assert(idx < num_items); |