Does stl library use malloc while copying pointers?
===

I have a question regarding copying pointers in the stl library. Say I define: 

`struct A{
int x;
}`

`std::map<int, const A*> map1;`

I then populate map1 using memory from the heap using malloc for the pointer to A.

Then I do 

`std::map<int, const A*> map2 = map1;`

For each pointer of struct A in map2, does std::map do a shallow copy of the pointers, or assign new memory from the heap for each of the pointers?

Cheers

Shanker