1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Manage the members of CommandOutputTarget with smart pointers

This commit is contained in:
Paul Licameli
2016-03-31 13:12:04 -04:00
parent e8ad90b3c9
commit 3481e678ea
6 changed files with 21 additions and 37 deletions

View File

@@ -110,8 +110,8 @@ Response ScriptCommandRelay::ReceiveResponse()
/// Get a pointer to a message target which allows commands to send responses
/// back to a script.
ResponseQueueTarget *ScriptCommandRelay::GetResponseTarget()
std::shared_ptr<ResponseQueueTarget> ScriptCommandRelay::GetResponseTarget()
{
// This should be deleted by a Command destructor
return new ResponseQueueTarget(sResponseQueue);
return std::make_shared<ResponseQueueTarget>(sResponseQueue);
}