From d2cf74027c2c252181ab16c1348281c252665353 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 18 Jan 2014 19:08:39 +0100 Subject: Song: embed the Tag object statically into class Song Reduces overhead because we need to manage only one memory allocation. According to valgrind/massif, we save 7%. --- src/db/UpnpDatabasePlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/db/UpnpDatabasePlugin.cxx') diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx index c1066fb7a..dbf04f818 100644 --- a/src/db/UpnpDatabasePlugin.cxx +++ b/src/db/UpnpDatabasePlugin.cxx @@ -205,7 +205,7 @@ upnpItemToSong(UPnPDirObject &&dirent, const char *uri) uri = dirent.url.c_str(); Song *s = Song::NewFile(uri, nullptr); - s->tag = new Tag(std::move(dirent.tag)); + s->tag = std::move(dirent.tag); return s; } -- cgit v1.2.3