Fixed a Track memory leak.

This commit is contained in:
casey langen 2018-01-24 00:00:37 -08:00
parent ab8517fd89
commit 06192f53a2
2 changed files with 1 additions and 4 deletions

View File

@ -46,7 +46,7 @@ class SdkWrapper : public Track {
public:
SdkWrapper(TrackPtr track) {
this->track = track;
this->count = 0;
this->count = 1;
}
virtual ~SdkWrapper() {

View File

@ -759,9 +759,6 @@ void WebSocketServer::RespondWithPlayQueueTracks(connection_hdl connection, json
else {
bool idsOnly = request[message::options].value(key::ids_only, false);
static auto releaseDeleter = [](ITrack* track) { track->Release(); };
static auto nullDeleter = [](ITrack* track) { };
/* now add the tracks to the output. they will be Release()'d automatically
as soon as this scope ends. */
json data = json::array();