To prevent losing the tabs you have opened in Firefox due to a crash or the needs to get a fresh start, go to the Options page first and make sure the option “Show your windows and tabs from last time” is selected in General section.
Then, to properly close Firefox, simply press the Alt key to bring up the top menu bar, click File and Exit.
Firefox will properly close down with the currently active windows and tabs saved for next time.
To restart Firefox right away to free up all memory, press Shift-F2 to pop up the GCLP console window and type restart into the box and press Enter.
That’s about it. Hope it helps.