Fix out-of-date comment for DwarfCUToModule::FilePrivate::common_strings.

No review.


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1063 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy 2012-10-05 21:59:33 +00:00
parent 4fcccf68cb
commit 9de66be60d

View file

@ -102,11 +102,19 @@ struct DwarfCUToModule::FilePrivate {
// our data structures, insert it into this set, and then use the string // our data structures, insert it into this set, and then use the string
// from the set. // from the set.
// //
// Because std::string uses reference counting internally, simply using // In some STL implementations, strings are reference-counted internally,
// strings from this set, even if passed by value, assigned, or held // meaning that simply using strings from this set, even if passed by
// directly in structures and containers (map<string, ...>, for example), // value, assigned, or held directly in structures and containers
// causes those strings to share a single instance of each distinct piece // (map<string, ...>, for example), causes those strings to share a
// of text. // single instance of each distinct piece of text. GNU's libstdc++ uses
// reference counts, and I believe MSVC did as well, at some point.
// However, C++ '11 implementations are moving away from reference
// counting.
//
// In other implementations, string assignments copy the string's text,
// so this set will actually hold yet another copy of the string (although
// everything will still work). To improve memory consumption portably,
// we will probably need to use pointers to strings held in this set.
set<string> common_strings; set<string> common_strings;
// A map from offsets of DIEs within the .debug_info section to // A map from offsets of DIEs within the .debug_info section to