By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,134 Members | 1,796 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,134 IT Pros & Developers. It's quick & easy.

STL map instance causing UMR?

P: n/a
I declared something like this and caught an UMR by using Purify.

main()
{
map<string, string> x;
exit(0);
}

below are part of the purify message:
map()
: _Mybase(key_compare(), allocator_type())
=> { // construct empty map from defaults
}

explicit map(const key_compare& _Pred)

Anyone has encountered this before? I am using VC++.Net ver7.0.9466
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Chage wrote:
I declared something like this and caught an UMR by using Purify.

main()
{
map<string, string> x;
exit(0);
}


The problem is not the map, but the use of the function exit(). It
doesn't call the destructors of local objects. Try just returning from
main().

Jul 22 '05 #2

P: n/a

"Rolf Magnus" <ra******@t-online.de> wrote in message news:bp*************@news.t-online.com...
Chage wrote:
I declared something like this and caught an UMR by using Purify.

main()
{
map<string, string> x;
exit(0);
}


The problem is not the map, but the use of the function exit(). It
doesn't call the destructors of local objects. Try just returning from
main().

That wouldn't have any bearing on a UMR. UMR is unitialized memory
references. Unfortunately, the entire VC++ runtime system is full
of them.
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.