Lecture Notes for CS 509

19 February 2004 - STL Lists


List splicing can invalidate iterators (in a way) if the lists are using two different allocators. The details are too disgusting to go into, but briefly, imagine you have two allocators, one for managing red storage and the other for managing blue storage. Now imagine a red list that uses the red-storage allocator and a blue list that uses the blue-storage allocator. Now splice a chunk of the red list into the blue list. Oops - now the blue-storage allocator has some red storage to manage.


This page last modified on 24 February 2004.