The destruction of a CStyleFileContainer at program exit should remove and delete all associated style files stored in the element m_StyleFiles, but unfortunately it doesn't.
The reason for this lies in the cyclic dependency between CStyleFile and CNewCommand, namely CStyleFile::m_Commands and CNewCommand::m_Parent (resp. CAbstractCommand::m_Parent because of inheritance). So, a style file contains commands, which in turn reference the style file; removing a style file from the CStyleFileContainer::m_StyleFiles doesn't delete it, because the reference counter maintained by the shared_ptr isn't zero.
A possible solution is enclosed in the diff file. It solves the problem by iterating through all style files and clearing each CStyleFile::m_Commands. It succeeds in deleting all objecs at exit, but isn't tested very well and may contain some problems when clearing the map at runtime.