For more complex operations, the rollback infrastructure must not only support the restoration of primitive state variables, but it also must support external I/O, generic dynamic memory allocation/deallocation, and container classes such as trees or lists that store the dynamically allocated memory.