Partial Undo

It is up to the implementor of a new class to decide whether to implement a partial undo mechanism for certain modification functions of the class. If only a small portion of an object's state is typically modified in a particular member function, using partial undo can yield substantial performance benefits. However, if your object state is small (512 bytes or less), it is probably not worth the effort to implement your own partial undo recording and restoring scheme.

If your modification function records a partial object state, you must implement the applyPartialUndo() function for your class so that the data can also be restored selectively. See Restoring State.