Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision 390630115fa35ef925f9e8e3037ed8611c6097c0)
+++ src/SynTree/Declaration.h	(revision fa463f18d6d521f0c6ade52d2a5106d42a026733)
@@ -153,5 +153,5 @@
   public:
 	NamedTypeDecl( const std::string &name, DeclarationNode::StorageClass sc, Type *type );
-	NamedTypeDecl( const TypeDecl &other );
+	NamedTypeDecl( const NamedTypeDecl &other );
 	virtual ~NamedTypeDecl();
 
Index: src/SynTree/NamedTypeDecl.cc
===================================================================
--- src/SynTree/NamedTypeDecl.cc	(revision 390630115fa35ef925f9e8e3037ed8611c6097c0)
+++ src/SynTree/NamedTypeDecl.cc	(revision fa463f18d6d521f0c6ade52d2a5106d42a026733)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// NamedTypeDecl.cc -- 
+// NamedTypeDecl.cc --
 //
 // Author           : Richard C. Bilson
@@ -21,5 +21,5 @@
 	: Parent( name, sc, LinkageSpec::Cforall ), base( base ) {}
 
-NamedTypeDecl::NamedTypeDecl( const TypeDecl &other )
+NamedTypeDecl::NamedTypeDecl( const NamedTypeDecl &other )
 	: Parent( other ), base( maybeClone( other.base ) ) {
 	cloneAll( other.parameters, parameters );
@@ -35,5 +35,5 @@
 void NamedTypeDecl::print( std::ostream &os, int indent ) const {
 	using namespace std;
-	
+
 	if ( get_name() != "" ) {
 		os << get_name() << ": ";
@@ -59,5 +59,5 @@
 void NamedTypeDecl::printShort( std::ostream &os, int indent ) const {
 	using namespace std;
-	
+
 	if ( get_name() != "" ) {
 		os << get_name() << ": ";
Index: src/SynTree/ReferenceToType.cc
===================================================================
--- src/SynTree/ReferenceToType.cc	(revision 390630115fa35ef925f9e8e3037ed8611c6097c0)
+++ src/SynTree/ReferenceToType.cc	(revision fa463f18d6d521f0c6ade52d2a5106d42a026733)
@@ -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 390630115fa35ef925f9e8e3037ed8611c6097c0)
+++ src/SynTree/Type.h	(revision fa463f18d6d521f0c6ade52d2a5106d42a026733)
@@ -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; }
