Quit when all windows are closed

Would be convenient if it were so. I’m quitting the application every time I close all windows. Don’t like to see applications open when they don’t have to be opened.