You cannot be serious. Globals are bad all the time.

While I may not agree with making the handle global in this case it should be noted that you cannot avoid globals. main( ) and WinMain( ) use, as do the functions to initialize a C/C++ app and to perform cleanup on exit. And then there are the globals that we see in just about any C++ framework/wrapper library (like MFC) that if we were to use it, we cannot avoid it's globals.


They cannot be avoided.

But at the same time I agree their usage should be limited. My globals were always prefixed with g_ and were only made global if their wasn't any other hierarchical object that should claim ownership.

/dev


_______________________________________________ msvc mailing list msvc@beginthread.com See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.

Reply via email to