Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 6b8c4a8c388b7ab43ded2b96957e296c130305ab)
+++ src/GenPoly/Box.cc	(revision eba74ba03a2c29999def828ffaf6afc87e2b40d1)
@@ -281,11 +281,12 @@
 	/// Adds parameters for otype layout to a function type
 	void addOtypeParams( FunctionType *layoutFnType, std::list< TypeDecl* > &otypeParams ) {
-		BasicType sizeAlignType( Type::Qualifiers(), BasicType::LongUnsignedInt );
-
-		for ( std::list< TypeDecl* >::const_iterator param = otypeParams.begin(); param != otypeParams.end(); ++param ) {
-			TypeInstType paramType( Type::Qualifiers(), (*param)->get_name(), *param );
-			std::string paramName = mangleType( &paramType );
-			layoutFnType->get_parameters().push_back( new ObjectDecl( sizeofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType.clone(), 0 ) );
-			layoutFnType->get_parameters().push_back( new ObjectDecl( alignofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType.clone(), 0 ) );
+		auto sizeAlignType = new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
+
+		for ( std::list< TypeDecl* >::const_iterator param = otypeParams.begin(); 
+				param != otypeParams.end(); ++param ) {
+			auto paramType = new TypeInstType( Type::Qualifiers(), (*param)->get_name(), *param );
+			std::string paramName = mangleType( paramType );
+			layoutFnType->get_parameters().push_back( new ObjectDecl( sizeofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType->clone(), 0 ) );
+			layoutFnType->get_parameters().push_back( new ObjectDecl( alignofName( paramName ), Type::StorageClasses(), LinkageSpec::Cforall, 0, sizeAlignType->clone(), 0 ) );
 		}
 	}
@@ -742,5 +743,6 @@
 				Type * newType = param->clone();
 				if ( env ) env->apply( newType );
-				ObjectDecl *newObj = ObjectDecl::newObject( tempNamer.newName(), newType, nullptr );
+				ObjectDecl *newObj = ObjectDecl::newObject( 
+					tempNamer.newName(), newType, nullptr );
 				newObj->get_type()->get_qualifiers() = Type::Qualifiers(); // TODO: is this right???
 				stmtsToAddBefore.push_back( new DeclStmt( newObj ) );
@@ -862,9 +864,7 @@
 			// do not carry over attributes to real type parameters/return values
 			for ( DeclarationWithType * dwt : realType->parameters ) {
-				deleteAll( dwt->get_type()->attributes );
 				dwt->get_type()->attributes.clear();
 			}
 			for ( DeclarationWithType * dwt : realType->returnVals ) {
-				deleteAll( dwt->get_type()->attributes );
 				dwt->get_type()->attributes.clear();
 			}
@@ -987,5 +987,4 @@
 			} // if
 			appExpr->get_args().clear();
-			delete appExpr;
 			return addAssign;
 		}
@@ -1018,5 +1017,4 @@
 						} // if
 						if ( baseType1 || baseType2 ) {
-							delete ret->get_result();
 							ret->set_result( appExpr->get_result()->clone() );
 							if ( appExpr->get_env() ) {
@@ -1025,5 +1023,4 @@
 							} // if
 							appExpr->get_args().clear();
-							delete appExpr;
 							return ret;
 						} // if
@@ -1035,5 +1032,4 @@
 							Expression *ret = appExpr->get_args().front();
 							// fix expr type to remove pointer
-							delete ret->get_result();
 							ret->set_result( appExpr->get_result()->clone() );
 							if ( appExpr->get_env() ) {
@@ -1042,5 +1038,4 @@
 							} // if
 							appExpr->get_args().clear();
-							delete appExpr;
 							return ret;
 						} // if
@@ -1182,5 +1177,4 @@
 						Expression *ret = expr->args.front();
 						expr->args.clear();
-						delete expr;
 						return ret;
 					} // if
@@ -1216,8 +1210,6 @@
 			if ( polytype || needs ) {
 				Expression *ret = addrExpr->arg;
-				delete ret->result;
 				ret->result = addrExpr->result->clone();
 				addrExpr->arg = nullptr;
-				delete addrExpr;
 				return ret;
 			} else {
@@ -1229,5 +1221,4 @@
 			if ( retval && returnStmt->expr ) {
 				assert( returnStmt->expr->result && ! returnStmt->expr->result->isVoid() );
-				delete returnStmt->expr;
 				returnStmt->expr = nullptr;
 			} // if
@@ -1272,5 +1263,4 @@
 				}
 			}
-//  deleteAll( functions );
 		}
 
@@ -1292,5 +1282,4 @@
 			for ( Declaration * param : functionDecl->type->parameters ) {
 				if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( param ) ) {
-					delete obj->init;
 					obj->init = nullptr;
 				}
@@ -1340,21 +1329,27 @@
 			std::list< DeclarationWithType *> inferredParams;
 			// size/align/offset parameters may not be used in body, pass along with unused attribute.
-			ObjectDecl newObj( "", Type::StorageClasses(), LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0,
-			                   { new Attribute( "unused" ) } );
-			ObjectDecl newPtr( "", Type::StorageClasses(), LinkageSpec::C, 0,
-			                   new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) ), 0 );
-			for ( Type::ForallList::const_iterator tyParm = funcType->get_forall().begin(); tyParm != funcType->get_forall().end(); ++tyParm ) {
+			auto newObj = new ObjectDecl(
+				"", Type::StorageClasses(), LinkageSpec::C, 0, 
+				new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0,
+			    { new Attribute( "unused" ) } );
+			auto newPtr = new ObjectDecl(
+				"", Type::StorageClasses(), LinkageSpec::C, 0,
+			    new PointerType( Type::Qualifiers(), 
+					new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) ), 0 );
+			for ( Type::ForallList::const_iterator tyParm = funcType->get_forall().begin(); 
+					tyParm != funcType->get_forall().end(); ++tyParm ) {
 				ObjectDecl *sizeParm, *alignParm;
 				// add all size and alignment parameters to parameter list
 				if ( (*tyParm)->isComplete() ) {
-					TypeInstType parmType( Type::Qualifiers(), (*tyParm)->get_name(), *tyParm );
-					std::string parmName = mangleType( &parmType );
-
-					sizeParm = newObj.clone();
+					auto parmType = new TypeInstType( 
+						Type::Qualifiers(), (*tyParm)->get_name(), *tyParm );
+					std::string parmName = mangleType( parmType );
+
+					sizeParm = newObj->clone();
 					sizeParm->set_name( sizeofName( parmName ) );
 					last = funcType->get_parameters().insert( last, sizeParm );
 					++last;
 
-					alignParm = newObj.clone();
+					alignParm = newObj->clone();
 					alignParm->set_name( alignofName( parmName ) );
 					last = funcType->get_parameters().insert( last, alignParm );
@@ -1379,10 +1374,10 @@
 
 					ObjectDecl *sizeParm, *alignParm, *offsetParm;
-					sizeParm = newObj.clone();
+					sizeParm = newObj->clone();
 					sizeParm->set_name( sizeofName( typeName ) );
 					last = funcType->get_parameters().insert( last, sizeParm );
 					++last;
 
-					alignParm = newObj.clone();
+					alignParm = newObj->clone();
 					alignParm->set_name( alignofName( typeName ) );
 					last = funcType->get_parameters().insert( last, alignParm );
@@ -1392,5 +1387,5 @@
 						// NOTE zero-length arrays are illegal in C, so empty structs have no offset array
 						if ( ! polyBaseStruct->get_baseStruct()->get_members().empty() ) {
-							offsetParm = newPtr.clone();
+							offsetParm = newPtr->clone();
 							offsetParm->set_name( offsetofName( typeName ) );
 							last = funcType->get_parameters().insert( last, offsetParm );
@@ -1443,6 +1438,6 @@
 			if ( Type * base = typeDecl->base ) {
 				// add size/align variables for opaque type declarations
-				TypeInstType inst( Type::Qualifiers(), typeDecl->name, typeDecl );
-				std::string typeName = mangleType( &inst );
+				auto inst = new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl );
+				std::string typeName = mangleType( inst );
 				Type *layoutType = new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt );
 
@@ -1501,7 +1496,5 @@
 							// polymorphic aggregate members should be converted into monomorphic members.
 							// Using char[size_T] here respects the expected sizing rules of an aggregate type.
-							Type * newType = polyToMonoType( field->type );
-							delete field->type;
-							field->type = newType;
+							field->type = polyToMonoType( field->type );
 						}
 					}
@@ -1526,5 +1519,4 @@
 					stmtsToAddBefore.push_back( new DeclStmt( newBuf ) );
 
-					delete objectDecl->get_init();
 					objectDecl->set_init( new SingleInit( new VariableExpr( newBuf ) ) );
 				}
@@ -1605,6 +1597,4 @@
 			}
 
-			delete memberType;
-			delete memberExpr;
 			return newMemberExpr;
 		}
@@ -1626,5 +1616,4 @@
 						addrExpr->arg = nullptr;
 						std::swap( addrExpr->env, ret->env );
-						delete addrExpr;
 						return ret;
 					}
@@ -1635,5 +1624,6 @@
 
 		ObjectDecl *PolyGenericCalculator::makeVar( const std::string &name, Type *type, Initializer *init ) {
-			ObjectDecl *newObj = new ObjectDecl( name, Type::StorageClasses(), LinkageSpec::C, nullptr, type, init );
+			ObjectDecl *newObj = new ObjectDecl( 
+				name, Type::StorageClasses(), LinkageSpec::C, nullptr, type, init );
 			stmtsToAddBefore.push_back( new DeclStmt( newObj ) );
 			return newObj;
@@ -1768,8 +1758,5 @@
 			
 			Expression * gen = genSizeof( ty );
-			if ( gen ) {
-				delete sizeofExpr;
-				return gen;
-			} else return sizeofExpr;
+			return gen ? gen : sizeofExpr;
 		}
 
@@ -1777,7 +1764,5 @@
 			Type *ty = alignofExpr->get_isType() ? alignofExpr->get_type() : alignofExpr->get_expr()->get_result();
 			if ( findGeneric( ty ) ) {
-				Expression *ret = new NameExpr( alignofName( mangleType( ty ) ) );
-				delete alignofExpr;
-				return ret;
+				return new NameExpr( alignofName( mangleType( ty ) ) );
 			}
 			return alignofExpr;
@@ -1794,10 +1779,7 @@
 				if ( i == -1 ) return offsetofExpr;
 
-				Expression *offsetInd = makeOffsetIndex( ty, i );
-				delete offsetofExpr;
-				return offsetInd;
+				return makeOffsetIndex( ty, i );
 			} else if ( dynamic_cast< UnionInstType* >( ty ) ) {
 				// all union members are at offset zero
-				delete offsetofExpr;
 				return new ConstantExpr( Constant::from_ulong( 0 ) );
 			} else return offsetofExpr;
@@ -1839,5 +1821,4 @@
 			}
 
-			delete offsetPackExpr;
 			return ret;
 		}
Index: src/GenPoly/GenPoly.cc
===================================================================
--- src/GenPoly/GenPoly.cc	(revision 6b8c4a8c388b7ab43ded2b96957e296c130305ab)
+++ src/GenPoly/GenPoly.cc	(revision eba74ba03a2c29999def828ffaf6afc87e2b40d1)
@@ -445,5 +445,4 @@
 		Type * newType = arg->clone();
 		if ( env ) env->apply( newType );
-		std::unique_ptr<Type> manager( newType );
 		// if the argument's type is polymorphic, we don't need to box again!
 		return ! isPolyType( newType );
Index: src/GenPoly/InstantiateGeneric.cc
===================================================================
--- src/GenPoly/InstantiateGeneric.cc	(revision 6b8c4a8c388b7ab43ded2b96957e296c130305ab)
+++ src/GenPoly/InstantiateGeneric.cc	(revision eba74ba03a2c29999def828ffaf6afc87e2b40d1)
@@ -58,6 +58,4 @@
 
 		TypeList& operator= ( const TypeList &that ) {
-			deleteAll( params );
-
 			params.clear();
 			cloneAll( that.params, params );
@@ -67,6 +65,4 @@
 
 		TypeList& operator= ( TypeList &&that ) {
-			deleteAll( params );
-
 			params = std::move( that.params );
 
@@ -74,5 +70,5 @@
 		}
 
-		~TypeList() { deleteAll( params ); }
+		~TypeList() {}
 
 		bool operator== ( const TypeList& that ) const {
@@ -293,5 +289,4 @@
 	/// Strips the instances's type parameters
 	void stripInstParams( ReferenceToType *inst ) {
-		deleteAll( inst->get_parameters() );
 		inst->get_parameters().clear();
 	}
@@ -300,6 +295,4 @@
 		substituteMembers( base->get_members(), baseParams, typeSubs );
 
-		// xxx - can't delete type parameters because they may have assertions that are used
-		// deleteAll( baseParams );
 		baseParams.clear();
 
@@ -380,5 +373,4 @@
 			newInst->set_baseStruct( concDecl );
 
-			delete inst;
 			inst = newInst;
 			break;
@@ -390,5 +382,4 @@
 		}
 
-		deleteAll( typeSubs );
 		return inst;
 	}
@@ -430,5 +421,4 @@
 			newInst->set_baseUnion( concDecl );
 
-			delete inst;
 			inst = newInst;
 			break;
@@ -439,5 +429,4 @@
 		}
 
-		deleteAll( typeSubs );
 		return inst;
 	}
@@ -477,5 +466,4 @@
 			ResolvExpr::adjustExprType( ret->result ); // pointer decay
 			std::swap( ret->env, memberExpr->env );
-			delete memberExpr;
 			return ret;
 		}
Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision 6b8c4a8c388b7ab43ded2b96957e296c130305ab)
+++ src/GenPoly/Lvalue.cc	(revision eba74ba03a2c29999def828ffaf6afc87e2b40d1)
@@ -51,5 +51,4 @@
 				assertf( base, "expected pointer type in dereference (type was %s)", toString( arg->result ).c_str() );
 				ApplicationExpr * ret = new ApplicationExpr( deref, { arg } );
-				delete ret->result;
 				ret->result = base->clone();
 				ret->result->set_lvalue( true );
@@ -176,5 +175,4 @@
 					return ret;
 				}
-				delete result;
 			}
 			return appExpr;
@@ -235,7 +233,5 @@
 							Type * baseType = InitTweak::getPointerBase( arg->result );
 							assertf( baseType, "parameter is reference, arg must be pointer or reference: %s", toString( arg->result ).c_str() );
-							PointerType * ptrType = new PointerType( Type::Qualifiers(), baseType->clone() );
-							delete arg->result;
-							arg->result = ptrType;
+							arg->set_result( new PointerType( Type::Qualifiers(), baseType->clone() ) );
 							arg = mkDeref( arg );
 							// assertf( arg->result->referenceDepth() == 0, "Reference types should have been eliminated from intrinsic function calls, but weren't: %s", toCString( arg->result ) );
@@ -409,10 +405,8 @@
 				}
 				ret->env = castExpr->env;
-				delete ret->result;
 				ret->result = castExpr->result;
 				castExpr->env = nullptr;
 				castExpr->arg = nullptr;
 				castExpr->result = nullptr;
-				delete castExpr;
 				return ret;
 			} else if ( diff < 0 ) {
@@ -430,5 +424,4 @@
 				}
 				ret->env = castExpr->env;
-				delete ret->result;
 				ret->result = castExpr->result;
 				ret->result->set_lvalue( true ); // ensure result is lvalue
@@ -436,5 +429,4 @@
 				castExpr->arg = nullptr;
 				castExpr->result = nullptr;
-				delete castExpr;
 				return ret;
 			} else {
@@ -451,5 +443,4 @@
 					castExpr->arg = nullptr;
 					std::swap( castExpr->env, ret->env );
-					delete castExpr;
 					return ret;
 				}
@@ -462,5 +453,4 @@
 			Type::Qualifiers qualifiers = refType->get_qualifiers();
 			refType->base = nullptr;
-			delete refType;
 			return new PointerType( qualifiers, base );
 		}
@@ -474,5 +464,4 @@
 				ret->env = expr->env;
 				expr->env = nullptr;
-				delete expr;
 				return ret;
 			} else if ( ConditionalExpr * condExpr = dynamic_cast< ConditionalExpr * >( arg ) ) {
@@ -483,5 +472,4 @@
 				ret->env = expr->env;
 				expr->env = nullptr;
-				delete expr;
 
 				// conditional expr type may not be either of the argument types, need to unify
@@ -516,5 +504,4 @@
 					arg0 = nullptr;
 					addrExpr->env = nullptr;
-					delete addrExpr;
 					return ret;
 				}
@@ -546,5 +533,4 @@
 						addrExpr->arg = nullptr;
 						appExpr->env = nullptr;
-						delete appExpr;
 						return ret;
 					}
Index: src/GenPoly/ScrubTyVars.cc
===================================================================
--- src/GenPoly/ScrubTyVars.cc	(revision 6b8c4a8c388b7ab43ded2b96957e296c130305ab)
+++ src/GenPoly/ScrubTyVars.cc	(revision eba74ba03a2c29999def828ffaf6afc87e2b40d1)
@@ -28,10 +28,7 @@
 		if ( ! tyVars ) {
 			if ( typeInst->get_isFtype() ) {
-				delete typeInst;
-				return new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) );
+				return new PointerType{ Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) };
 			} else {
-				PointerType * ret = new PointerType( Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) );
-				delete typeInst;
-				return ret;
+				return new PointerType{ Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) };
 			}
 		}
@@ -42,12 +39,7 @@
 			  case TypeDecl::Dtype:
 			  case TypeDecl::Ttype:
-				{
-					PointerType * ret = new PointerType( Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) );
-					delete typeInst;
-					return ret;
-				}
+				return new PointerType{ Type::Qualifiers(), new VoidType( typeInst->get_qualifiers() ) };
 			  case TypeDecl::Ftype:
-				delete typeInst;
-				return new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) );
+				return new PointerType{ Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) };
 			} // switch
 		} // if
@@ -57,7 +49,5 @@
 	Type * ScrubTyVars::mutateAggregateType( Type * ty ) {
 		if ( shouldScrub( ty ) ) {
-			PointerType * ret = new PointerType( Type::Qualifiers(), new VoidType( ty->get_qualifiers() ) );
-			delete ty;
-			return ret;
+			return new PointerType{ Type::Qualifiers(), new VoidType( ty->get_qualifiers() ) };
 		}
 		return ty;
@@ -104,6 +94,4 @@
 			Type * ret = dynType->acceptMutator( *visitor );
 			ret->get_qualifiers() |= pointer->get_qualifiers();
-			pointer->base = nullptr;
-			delete pointer;
 			return ret;
 		}
Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision 6b8c4a8c388b7ab43ded2b96957e296c130305ab)
+++ src/GenPoly/Specialize.cc	(revision eba74ba03a2c29999def828ffaf6afc87e2b40d1)
@@ -17,5 +17,4 @@
 #include <iterator>                      // for back_insert_iterator, back_i...
 #include <map>                           // for _Rb_tree_iterator, _Rb_tree_...
-#include <memory>                        // for unique_ptr
 #include <string>                        // for string
 #include <tuple>                         // for get
@@ -193,5 +192,4 @@
 				explodeSimple( new TupleIndexExpr( expr->clone(), i ), out );
 			}
-			delete expr;
 		} else {
 			// non-tuple type - output a clone of the expression
@@ -226,5 +224,4 @@
 			env->apply( actualType );
 		}
-		std::unique_ptr< FunctionType > actualTypeManager( actualType ); // for RAII
 		std::list< DeclarationWithType * >::iterator actualBegin = actualType->get_parameters().begin();
 		std::list< DeclarationWithType * >::iterator actualEnd = actualType->get_parameters().end();
