v.19.4Bug Fixes

Avoid Std::terminate in Case of Memory Allocation Failure

Avoid std::terminate in case of memory allocation failure. Now std::bad_alloc exception is thrown as expected. #4665 (alexey-milovidov)