Cardinal Peak logo placeholder
Blog Post
Software Development

RAII in C

In my last post, I talked about resource management, and how RAII, Resource Acquisition is Initialization, is important in C++ because of the guarantees it provides. In this post, I’ll show how we can make the same guarantees in C. In C++, RAII provides a solution to resource management and the issues arising with exceptions.... View Article
Cardinal Peak
Blog Post
Software Development

RAII Introduction

Explore RAII: a powerful C++ programming idiom for resource management. Learn how it ensures exception safety, prevents leaks, and can be applied in C.
In my last post, I talked about resource management, and how RAII, Resource Acquisition is Initialization, is important in C++ because of the guarantees it provides. In this post, I’ll show how we can make the same guarantees in C. In C++, RAII provides a solution to resource management and the issues arising with exceptions.... View Article
Explore RAII: a powerful C++ programming idiom for resource management. Learn how it ensures exception safety, prevents leaks, and can be applied in C.