When rolling back to a savepoint, any DML operations that occurred after that savepoint are undone, but static variables are not reverted. Therefore, when a rollback occurs, the state of all static variables at the time of the rollback remains the same as it was just before the rollback. References: Apex Developer Guide - Savepoint and Transaction Control