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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user