You're forgetting a third way: static local function variables being returned by reference.