Problem with TGeoManager

Hello,

I am building a geometry with more than 100,000 volumes and it is working fine.
But when I try to quit ROOT it crashes and starts to use 100% of the CPU.

I am sending my geometry macro.
Could you try to reproduce the problem, please?
To run it just type “.x CaloBuild.C+”

thanks in advance,
Luciano
CaloGeoConst.h (67.7 KB)
CaloBuild.C (22 KB)