Skip to content

Commit cac791a

Browse files
committed
fix: audio test object leak
1 parent 139b8b4 commit cac791a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

engine/audio/test/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ namespace {
149149
player->setLoop(true, start, length);
150150
}
151151
}
152+
void destroyResources() {
153+
engine.reset();
154+
player.reset();
155+
decoder.reset();
156+
}
152157
int run() {
153158
if (!core::IAudioEngine::create(engine.put())) {
154159
core::Logger::error("core::IAudioEngine::create");
@@ -225,6 +230,7 @@ namespace {
225230
}
226231
}
227232

233+
destroyResources();
228234
return 0;
229235
}
230236
}

0 commit comments

Comments
 (0)