Index: src/Parser/LinkageSpec.cc
===================================================================
--- src/Parser/LinkageSpec.cc	(revision 6943a9871116ec46c4e36b597cc04f17cd4d347e)
+++ src/Parser/LinkageSpec.cc	(revision 5e644d3ef72d65dc187491097854dec3ad90c16e)
@@ -14,4 +14,5 @@
 //
 
+#include <memory>
 #include <string>
 #include <cassert>
@@ -21,4 +22,5 @@
 
 LinkageSpec::Spec LinkageSpec::fromString( const std::string &spec ) {
+	std::unique_ptr<const std::string> guard(&spec);		// allocated by lexer
 	if ( spec == "\"Cforall\"" ) {
 		return Cforall;
@@ -28,5 +30,4 @@
 		throw SemanticError( "Invalid linkage specifier " + spec );
 	} // if
-	delete &spec;										// allocated by lexer
 }
 
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 6943a9871116ec46c4e36b597cc04f17cd4d347e)
+++ src/SymTab/Validate.cc	(revision 5e644d3ef72d65dc187491097854dec3ad90c16e)
@@ -531,5 +531,5 @@
 			TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() );
 			assert( base != typedeclNames.end() );
-			typeInst->set_baseType( base->second->clone() );
+			typeInst->set_baseType( base->second );
 		} // if
 		return typeInst;
Index: src/SynTree/ReferenceToType.cc
===================================================================
--- src/SynTree/ReferenceToType.cc	(revision 6943a9871116ec46c4e36b597cc04f17cd4d347e)
+++ src/SynTree/ReferenceToType.cc	(revision 5e644d3ef72d65dc187491097854dec3ad90c16e)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// ReferenceToType.cc -- 
+// ReferenceToType.cc --
 //
 // Author           : Richard C. Bilson
@@ -36,5 +36,5 @@
 void ReferenceToType::print( std::ostream &os, int indent ) const {
 	using std::endl;
-	
+
 	Type::print( os, indent );
 	os << "instance of " << typeString() << " " << name << " ";
@@ -128,4 +128,8 @@
 }
 
+TypeInstType::~TypeInstType() {
+	// delete baseType; //This is shared and should not be deleted
+}
+
 void TypeInstType::set_baseType( TypeDecl *newValue ) {
 	baseType = newValue;
@@ -137,5 +141,5 @@
 void TypeInstType::print( std::ostream &os, int indent ) const {
 	using std::endl;
-	
+
 	Type::print( os, indent );
 	os << "instance of " << typeString() << " " << get_name() << " (" << ( isFtype ? "" : "not" ) << " function type) ";
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 6943a9871116ec46c4e36b597cc04f17cd4d347e)
+++ src/SynTree/Type.h	(revision 5e644d3ef72d65dc187491097854dec3ad90c16e)
@@ -327,4 +327,5 @@
 	TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype );
 	TypeInstType( const TypeInstType &other ) : Parent( other ), baseType( other.baseType ), isFtype( other.isFtype ) {}
+	~TypeInstType();
 
 	TypeDecl *get_baseType() const { return baseType; }
