Skip to content

Commit 074d10f

Browse files
committed
Rename doRelease to isDeletable
1 parent 5f94d32 commit 074d10f

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/AudioTools/AudioPrint.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class AudioPrint : public Print, public AudioBaseInfoDependent, public AudioBase
5959
p_notify = &bi;
6060
}
6161

62-
/// If true we need to release the related memory
63-
virtual bool doRelease() {
62+
/// If true we need to release the related memory in the destructor
63+
virtual bool isDeletable() {
6464
return false;
6565
}
6666

@@ -270,7 +270,8 @@ class AdapterAudioStreamToAudioPrint : public AudioPrint {
270270
return p_stream->write(buffer,size);
271271
}
272272

273-
virtual bool doRelease() {
273+
/// If true we need to release the related memory in the destructor
274+
virtual bool isDeletable() {
274275
return true;
275276
}
276277

@@ -292,7 +293,8 @@ class AdapterPrintToAudioPrint : public AudioPrint {
292293
size_t write(const uint8_t *buffer, size_t size){
293294
return p_print->write(buffer,size);
294295
}
295-
virtual bool doRelease() {
296+
/// If true we need to release the related memory in the destructor
297+
virtual bool isDeletable() {
296298
return true;
297299
}
298300
protected:
@@ -335,7 +337,7 @@ class MultiOutput : public AudioPrint {
335337

336338
virtual ~MultiOutput() {
337339
for (int j=0;j<vector.size();j++){
338-
if (vector[j]->doRelease()){
340+
if (vector[j]->isDeletable()){
339341
delete vector[j];
340342
}
341343
}

0 commit comments

Comments
 (0)