Reliable Software Logo
 Home  >  C++ Resources  >   Resource Management

The Official Resource Management Page

by Bartosz Milewski


I keep hearing horror stories from fellow programmers about memory leaks, double deletions, unreleased resources, files that are never closed and deadlocks caused by unreleased mutexes. Frankly, I haven't had a problem like this for many years. No, I'm not programming in Java or C#. So what's the secret? It's called "Resource Management."

There is a product on the market, the Microsoft Index Server™, which was written using this methodology. It's a large and complex piece of software that includes its own special-purpose concurrently accessible transactional database. Having been involved in that project from the very beginning as an architect and a programming lead, I could argue that without Resource Management the Index Server would have never seen the light of day. Resource Management helped us tremendously in balancing a whole multitude of indexes that were accessed concurrently by a number of query threads and at the same time updated with new data coming from the file system.

After leaving Microsoft, I made it one of my goals not only to use Resource Management in all my future projects, but also to make it available to the C++ community through publications, conferences and a dedicated web site.

Introduction to Resource Management

  1. Resources
  2. Smart Pointers
  3. Resource Transfer
  4. Strong Vectors
  5. Example

Resource Management Presentation

Power Point presentation about Resource Management. Feel free to use it in your class or at a meeting.


This is an original article available only here, at Reliable Software web site. It describes the new improved implementation of auto_vector template. It supercedes the "Strong Vectors" from the article above.

Download Source Code Download source code: auto_vector.h.