Catching allocation and deallocation errors
Your allocations and deallocations will occasionally fail. This can happen if you try to allocate more memory than available, allocate an object that’s already allocated, or free an object that has been freed. When it happens, the program will abort. However, the allocate statement also comes with built-in error handling if you want finer control over what happens […]