BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

STL map unusual behaviour

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Feb 16, 2006 7:03 am    Post subject: STL map unusual behaviour Reply with quote



Hi,

I am using two STL maps as data member for COM server with
VC++6.0.These two maps are unrelated in the sense that they are storing
different data.
first map is of type(6 MB in size)
std::map<long,ISumInfo*>

and second is of type(3 MB in process)
std::map<string,list<string> >

I want to clear the first map but on clearing the map the memory
doesn't come down for process.But as soon as I clear the second map the
memory comes down is equivalent
to size of both the maps.

I am not able to understand that how two maps are related.
For clearing the first map I have released the IsumInfo objects and
destructors are getting invoked properly for clearing the map I have
tried calling
three ways but the result is same.
//m_siteDB.clear();

//m_siteDB.erase(m_siteDB.begin(), m_siteDB.end());

//std::map<long,ISumInfo*>().swap(m_siteDB);


If somebody have faced this issue,Please let me know

Thanx
Sumit
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.