In Mac, the red close button on extreme left of application window title bar isn’t meant to quit the application in question. Unlike Windows where clicking the Close button on top-right corner of window quits the application and unloads it from memory, Mac doesn’t always close down the application; in some cases, application window becomes invisible but continues to run in background. That’s the reason why many proficient Mac OS X users always quit application from system menu bar (as shown in screenshot above) or alternatively use command-Q hotkey combination. If you want to replace default method of closing down application window with Windows like application quitting method, try RedQuits for Mac. It is a small application written to let users completely close down application, with all its instances and open windows, by clicking the red button present in top-left corner of window.
The application comes as a package and can only be installed with administrative privileges. When you open the launcher, it will ask you to enter admin username and password to install the package. After installation is finished, launch RedQuits from Mac Applications folder.
You can close multiple windows of an application by clicking the red cross button as long as RedQuits is running in background. Suppose you have two TextEdit windows opened, with RedQuits enabled, just click red close button on any window to close all other related windows and/or completely quit the application.
ReqQuits is by far the best replacement of command-q hotkey function. It works on Mac OS X Snow Leopard and Lion.