Moved the memory logging to NDEBUG

This commit is contained in:
Paul Ferrand 2019-12-02 12:35:14 +01:00
parent c00f5174b1
commit 78b90350a8
3 changed files with 3 additions and 3 deletions

View file

@ -273,7 +273,7 @@ int main(int argc, char** argv)
signal(SIGQUIT, done); signal(SIGQUIT, done);
while (!shouldClose){ while (!shouldClose){
#ifdef DEBUG #ifndef NDEBUG
std::cout << "Allocated buffers: " << synth.getAllocatedBuffers() << '\n'; std::cout << "Allocated buffers: " << synth.getAllocatedBuffers() << '\n';
std::cout << "Total size: " << synth.getAllocatedBytes() << '\n'; std::cout << "Total size: " << synth.getAllocatedBytes() << '\n';
#endif #endif

View file

@ -578,7 +578,7 @@ run(LV2_Handle instance, uint32_t sample_count)
} }
} }
#ifdef DEBUG #ifndef NDEBUG
// Log the buffer usage // Log the buffer usage
self->sample_counter += (int)sample_count; self->sample_counter += (int)sample_count;
if (self->sample_counter > LOG_SAMPLE_COUNT) if (self->sample_counter > LOG_SAMPLE_COUNT)

View file

@ -44,7 +44,7 @@ public:
BufferCounter() = default; BufferCounter() = default;
~BufferCounter() ~BufferCounter()
{ {
#ifdef DEBUG #ifndef NDEBUG
std::cout << "Remaining buffers on destruction: " << numBuffers << '\n'; std::cout << "Remaining buffers on destruction: " << numBuffers << '\n';
std::cout << "Total size: " << bytes << '\n'; std::cout << "Total size: " << bytes << '\n';
#endif #endif