summaryrefslogtreecommitdiff
path: root/RtAudio.cpp
diff options
context:
space:
mode:
authorHirotoshi YOSHITAKA <tyounan.moti@gmail.com>2014-10-06 23:54:11 +0900
committerHirotoshi YOSHITAKA <tyounan.moti@gmail.com>2014-10-06 23:54:11 +0900
commit17188fb2b1f05d8bdee44fc9d5bc339da3e78912 (patch)
treef43ad83110d5e966e91b774b660fa9f2507ad797 /RtAudio.cpp
parente2f63bd30514c7a8dc3439a681a87681ef0ad6d3 (diff)
Fix calloc-free mismatch
Use free() for allocated memory by calloc (not delete). Deleting calloc-ed memory will become problem in the environment which overrides global "operator delete" like some game engine.
Diffstat (limited to 'RtAudio.cpp')
-rw-r--r--RtAudio.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp
index af7d205..9e1f1ba 100644
--- a/RtAudio.cpp
+++ b/RtAudio.cpp
@@ -3630,12 +3630,12 @@ public:
outIndex_( 0 ) {}
~WasapiBuffer() {
- delete buffer_;
+ free( buffer_ );
}
// sets the length of the internal ring buffer
void setBufferSize( unsigned int bufferSize, unsigned int formatBytes ) {
- delete buffer_;
+ free( buffer_ );
buffer_ = ( char* ) calloc( bufferSize, formatBytes );