|
From: Stephen T. <st...@to...> - 2005-03-15 19:43:16
|
I have the follow message from memcheck.
==32005==
==32005== Conditional jump or move depends on uninitialised value(s)
==32005== at 0x1BE5920A: std::string::~string() (basic_string.h:226)
==32005== by 0x1BC54534:
kurt::data_types::Single_Hash<std::string>::operator()(std::string)
const (Tables_T.hpp:58)
==32005== by 0x1BC540E9: __gnu_cxx::hashtable<std::pair<std::string
const, std::string>, std::string,
kurt::data_types::Single_Hash<std::string>,
std::_Select1st<std::pair<std::string const, std::string> >,
std::equal_to<std::string>, std::allocator<std::string>
>::_M_bkt_num_key(std::string const&, unsigned) const(hashtable.h:518)
==32005== by 0x1BC53843: __gnu_cxx::hashtable<std::pair<std::string
const, std::string>, std::string,
kurt::data_types::Single_Hash<std::string>,
std::_Select1st<std::pair<std::string const, std::string> >,
std::equal_to<std::string>, std::allocator<std::string>
>::_M_bkt_num_key(std::string const&) const (hashtable.h:508)
I don't understand what is wrong with the following code:
size_t operator() (Key_Type val) const
{
std::stringstream input;
input << val;
std::string textstring = input.str();
const char* textcharstring = textstring.c_str();
size_t hash_val = __gnu_cxx::__stl_hash_string(textcharstring);
return hash_val; << Error: Line 58 - Tables_T.hpp
}
What is up with the std::string destructor?
Stephen
|