Reduce the risk of the files or sockets being closed after the end of 'main' (or more exactly before the library start being unloaded) by calling CloseFiles and ResetGlobals in the destructor of the TApplication (which is in most cases on the stack of the main function)
Reduce the risk of the files or sockets being closed after the end of 'main' (or more exactly before the library start being unloaded) by calling CloseFiles and ResetGlobals in the destructor of the TApplication (which is in most cases on the stack of the main function)

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@48219 27541ba8-7e3a-0410-8455-c3a389f83636
(cherry picked from commit 84dfc99672b0eaa836d173dc4171dffcc19742ea)

Dr15Jones/root,Dr15Jones/root,tc3t/qoot,kirbyherm/root-r-tools,kirbyherm/root-r-tools,Dr15Jones/root,kirbyherm/root-r-tools,kirbyherm/root-r-tools,tc3t/qoot,tc3t/qoot,kirbyherm/root-r-tools,Dr15Jones/root,tc3t/qoot,kirbyherm/root-r-tools,Dr15Jones/root,tc3t/qoot,Dr15Jones/root,kirbyherm/root-r-tools,tc3t/qoot,Dr15Jones/root,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot