Boost C++ Libraries Home Libraries People FAQ More

Next

Chapter 1. Boost.ScopeExit

Alexander Nasonov

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt"> http://www.boost.org/LICENSE_1_0.txt </ulink>)

Table of Contents

Introduction
Tutorial
Alternatives
Supported Compilers
Configuration
Reference
Acknowledge

Introduction

Nowadays, every C++ developer is familiar with RAII technique. It binds resource acquisition and release to initialization and destruction of a variable that holds the resource. But there are times when writing a special class for such variable is not worth the effort.

This is when ScopeExit macro comes into play. You put resource acquisition directly in your code and next to it you write a code that releases the resource.

Read Tutorial to find out how to write programs with ScopeExit or jump straight to the Reference section.

Last revised: July 08, 2010 at 22:36:27 GMT


Next