In your code the objects are
local static variables
(see, for instance, here[
^]).
That is the constructors (and destructors) of
x1
and
x2
are called once per application execution, no matter how many times the function
f
is called. Moreover, has stated by the documentation, the objects retains their states between calls to
f
.