1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Demos: Convey proper ownership semantics

This commit is contained in:
reuk 2020-03-12 11:34:06 +00:00
parent 4abffb1f11
commit 5af01b9b16
20 changed files with 77 additions and 76 deletions

View file

@ -174,8 +174,8 @@ void SoundPlayer::play (const void* resourceData, size_t resourceSize)
{
if (resourceData != nullptr && resourceSize > 0)
{
MemoryInputStream* mem = new MemoryInputStream (resourceData, resourceSize, false);
play (formatManager.createReaderFor (mem), true);
auto mem = std::make_unique<MemoryInputStream> (resourceData, resourceSize, false);
play (formatManager.createReaderFor (std::move (mem)), true);
}
}