I agree with you. While it isn't "incorrect" it is a maintenance hassle. I
try to keep variables as close to in scope as I can. Global variables that
manage.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
It is called "A maintenance nightmare". Dialogs that depend upon global
state rapidly
create situations in which it is nearly impossible to actually maintain
the code.
Memory leaks are not an issue here. Unmaintainable code is the issue.
In the presence of windowing and multithreading, global variables tend to
cause
malfunctions because the assumptions you made when you wrote the code
change in a few
months but you've forgotten about the global variables.
joe
On Tue, 9 Sep 2008 10:30:14 -0700 (PDT), RAB <rabmissouri@yahoo.com>
wrote:
Why would using a global variable be incorrect? I don't want to be
contrarian but rather am trying to learn. I have seen this on other
posts but do not understand why? Does it cause a memory leak?.. app
more likely to crash at run-time??
Thanks,
RABMissouri
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm