Object data or local state refers to any non-static data elements in the dispenser class.
The problem is that currently (in c++03 ) there is no support for distributors with the so-called local state. This is often considered a drawback of the dispenser model in modern c++ .
Read this article that details the design of the custom valve. The paragraph in the Design section addresses some of the trap issues that include the local state.
In short, some operations in the standard library currently require objects of a certain type to be reliably distributed by one instance of the allocator and freed by another instance of the allocator (both allocators of the same type - of course!). This could be, for example, when implementing list::splice . If the dispensers are allowed to have a local state, this can become complicated ...
In the upcoming c++0x version, it looks like distributors will be allowed to enable local state, see the scope section section> here .
Hope this helps.
source share