Both Ccleaner and Firefox allow you to control the type of information is deleted during the cleaning operation. The Firefox default is to retain history items for 9 days. You can adjust that time or you can choose to retain no history on shutdown.
To fine tune the items deleted on shutdown, go to Tools>Options>Privacy> "Private Data" Settings.
Bookmarks