Pattern languages for handling C++ resources in an exception-safe way

  • Authors:
  • Harald M. Mueller

  • Affiliations:
  • Siemens AG Austria

  • Venue:
  • COOTS'96 Proceedings of the 2nd conference on USENIX Conference on Object-Oriented Technologies (COOTS) - Volume 2
  • Year:
  • 1996

Quantified Score

Hi-index 0.00

Visualization

Abstract

Using exception handling in C++ can lead to severe problems with dynamic objects and other resources-- dangling pointers, memory leaks etc. By using a small set of patterns (collected into a pattern language "Exception-safe C++ objects"), these problems can be avoided. However, it turns out that these pattern make use of "resource management", which poses a lot of questions in itself. For the solution of these problems, a second, somewhat larger set of patterns (collected into a pattern language "Responsibility management under exception handling") is provided.