O'Reilly logo

Extended STL, Volume 1: Collections and Iterators by Matthew Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 28. Adapting COM Enumerators

 

A subtle thought that is in error may yet give rise to fruitful inquiry that can establish truths of great value.

 
 --Isaac Asimov
 

Smoke me a kipper, I’ll be back for breakfast!

 
 --Ace Rimmer, Red Dwarf

Introduction

One of the technical reasons that COM has fallen out of favor in this millennium is the extreme verbosity of code in C++. Two more are the complexity of reference-count management and the relative ease with which users can mismanage resource ownership, both of which can lead to leaks and/or double deletion. COM enumerators and COM collections are two of the major problem areas. This is compounded by the fact that, because they are language-independent, COM interface methods may not throw exceptions, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required