Hi Igor,

 

I’m using “new” to allocate the object. My code looks like,

 

In hpp file,

       typedef Std::map<Std::string, int> MyMap;

 

       class MyClass {

           ………………………..

           private

                      boost::shared_ptr< MyMap > m_myMap;

       }

 

In cpp file

      MyClass::MyClass() {

          m_ myMap.reset(new MyMap);

     }

 

      MyClass::~MyClass() {

          m_ myMap.reset();

     }

 

Best regards,

Hua