what is the reason for allocating std::map on heap??