Skip to content

Commit

Permalink
StreamCopyT destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Dec 8, 2024
1 parent ba2f996 commit f684307
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/AudioTools/CoreAudio/StreamCopy.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class StreamCopyT {
begin();
}

~StreamCopyT() {
end();
}

/// (Re)starts the processing
void begin(){
TRACED();
Expand All @@ -55,7 +59,10 @@ class StreamCopyT {

/// Ends the processing
void end() {
if (is_cleanup_from) delete this->from;
if (is_cleanup_from) {
delete this->from;
is_cleanup_from = false;
}
this->from = nullptr;
this->to = nullptr;
}
Expand Down

0 comments on commit f684307

Please sign in to comment.