]> www.ginac.de Git - ginac.git/blobdiff - ginac/symbol.cpp
[BUGFIX] Reclaiming the memory allocated for static objects *is* necessary.
[ginac.git] / ginac / symbol.cpp
index cf31cb490a4de81de5638f06f7ab2900487ae1a3..6eedfef3b6142b0fd4e53107ced16ccac916d830 100644 (file)
@@ -306,10 +306,10 @@ unsigned symbol::calchash() const
 
 /** Symbols not constructed with a string get one assigned using this
  *  prefix and a number. */
-std::string & symbol::autoname_prefix()
+std::string& symbol::autoname_prefix()
 {
-       static std::string *s = new std::string("symbol");
-       return *s;
+       static std::string s("symbol");
+       return s;
 }
 
 /** Return default TeX name for symbol. This recognizes some greek letters. */