Quote Originally Posted by Thomas
The variable bar is not shared among other methods but only by the method foo itself.
One could say it's shared among all calls to that function. Anyway, you are right, static variables can cause a lot of troubles even in a single-threaded application.