diff --git a/src/memory/BHeapMemory.hpp b/src/memory/BHeapMemory.hpp index 1520379611fe33e159e100fad6a786448b997d0d..eded6297ea3a936531059091d256289d2a599afc 100644 --- a/src/memory/BHeapMemory.hpp +++ b/src/memory/BHeapMemory.hpp @@ -26,10 +26,10 @@ typedef unsigned char byte; * * It differs from HeapMemory in resize behavior. * - * In the case of HeapMemory if you try to shrink the memory nothing happen to the allocated memory. + * In the case of BHeapMemory if you try to shrink the memory nothing happen to the allocated memory. * To destroy the internal memory you must use destroy. * - * BHeapMemory does not shrink the memory, but it shrink the buffer size. size will always return the buffer size + * BHeapMemory does not shrink the memory, but it shrink the buffer size. size() always return the buffer size * * ### Allocate memory * @@ -66,7 +66,7 @@ public: :HeapMemory(),buf_sz(0) {}; - virtual ~BHeapMemory() + virtual ~BHeapMemory() noexcept { }; diff --git a/src/memory/HeapMemory.hpp b/src/memory/HeapMemory.hpp index 9b5ceba8b1b7e5569873b3932faf01c06ad63644..94557cdf4de21d5520f9098e28dffdfbfa1bed93 100644 --- a/src/memory/HeapMemory.hpp +++ b/src/memory/HeapMemory.hpp @@ -138,7 +138,7 @@ public: //! Constructor, we choose a default alignment of 32 for avx HeapMemory():alignement(MEM_ALIGNMENT),sz(0),dm(NULL),dmOrig(NULL),ref_cnt(0) {}; - virtual ~HeapMemory() + virtual ~HeapMemory() noexcept { if(ref_cnt == 0) HeapMemory::destroy(); diff --git a/src/util/print_stack.hpp b/src/util/print_stack.hpp index ed46c122ff625563cc9e8a0b240edf48af889223..68a1130b9ffd2cc52add505bc925aaf2baaf7022 100644 --- a/src/util/print_stack.hpp +++ b/src/util/print_stack.hpp @@ -119,6 +119,10 @@ static inline void print_stack() std::cerr << str.str() << std::endl; +#else + + std::cerr << "Stack trace deactivated" << std::endl; + #endif }