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);
while (!shouldClose){
#ifdef DEBUG
#ifndef NDEBUG
std::cout << "Allocated buffers: " << synth.getAllocatedBuffers() << '\n';
std::cout << "Total size: " << synth.getAllocatedBytes() << '\n';
#endif

View file

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

View file

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