Firefox often continues running 'invisibly' for quite some time (often several minutes) after you think that you've closed it.
As you come towards the end of a browsing session, open the Task Manager (via right-clicking on the toolbar at the foot of your screen) and select 'Processes'. Click on Firefox.exe to highlight it (simply so that you can easily see it in the list).
Then close Firefox and wait to so just how long Firefox.exe remains listed in Task Manager as a running process. I can almost guarantee that it will be there for several minutes before it finally disappears!