diff --git a/src/interpret.c b/src/interpret.c
index 75e51ea..ccef9fa 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -77,7 +77,7 @@ main(int argc, char **argv)
 		termcap = _vte_termcap_new("/etc/termcap");
 	}
 	buffer = _vte_buffer_new();
-	array = g_array_new(TRUE, TRUE, sizeof(gunichar));
+	array = g_array_new(FALSE, FALSE, sizeof(gunichar));
 
 	matcher = _vte_matcher_new(terminal, termcap);
 
diff --git a/src/iso2022.c b/src/iso2022.c
index 8dc604c..b81acc6 100644
--- a/src/iso2022.c
+++ b/src/iso2022.c
@@ -1060,13 +1060,16 @@ #endif
 	return sequence_length;
 }
 
-static void
-_vte_iso2022_fragment_input(struct _vte_buffer *input, GArray *blocks)
+static GArray *
+_vte_iso2022_fragment_input(struct _vte_buffer *input)
 {
 	unsigned char *nextctl = NULL, *p, *q;
 	glong sequence_length = 0;
 	struct _vte_iso2022_block block;
 	gboolean quit;
+	GArray *blocks;
+
+	blocks = g_array_new(FALSE, FALSE, sizeof(struct _vte_iso2022_block));
 
 	p = input->bytes;
 	q = input->bytes + _vte_buffer_length(input);
@@ -1123,6 +1126,8 @@ _vte_iso2022_fragment_input(struct _vte_
 			break;
 		}
 	}
+
+	return blocks;
 }
 
 static int
@@ -1706,9 +1711,7 @@ _vte_iso2022_process(struct _vte_iso2022
 	gboolean preserve_last = FALSE;
 	int i, initial;
 
-	blocks = g_array_new(TRUE, TRUE, sizeof(struct _vte_iso2022_block));
-
-	_vte_iso2022_fragment_input(input, blocks);
+	blocks = _vte_iso2022_fragment_input(input);
 
 	for (i = 0; i < blocks->len; i++) {
 		block = &g_array_index(blocks, struct _vte_iso2022_block, i);
@@ -1852,7 +1855,7 @@ main(int argc, char **argv)
 
 	state = _vte_iso2022_state_new(NULL, NULL, NULL);
 	buffer = _vte_buffer_new();
-	gunichars = g_array_new(TRUE, TRUE, sizeof(gunichar));
+	gunichars = g_array_new(FALSE, FALSE, sizeof(gunichar));
 	if (argc > 1) {
 		string = g_string_new(NULL);
 		for (i = 1; i < argc; i++) {
diff --git a/src/vte.c b/src/vte.c
index 9a96dba..a789306 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -877,7 +877,7 @@ vte_terminal_match_contents_refresh(VteT
 {
 	GArray *array;
 	_vte_terminal_match_contents_clear(terminal);
-	array = g_array_new(FALSE, TRUE, sizeof(struct _VteCharAttributes));
+	array = g_array_new(FALSE, FALSE, sizeof(struct _VteCharAttributes));
 	terminal->pvt->match_contents = vte_terminal_get_text(terminal,
 							      always_selected,
 							      NULL,
@@ -3163,7 +3163,7 @@ #endif
 
 	/* Remove most of the processed characters. */
 	if (start < wcount) {
-		unichars = g_array_new(TRUE, TRUE, sizeof(gunichar));
+		unichars = g_array_new(FALSE, FALSE, sizeof(gunichar));
 		g_array_append_vals(unichars,
 				    &g_array_index(terminal->pvt->pending,
 						   gunichar,
@@ -6714,7 +6714,7 @@ #endif
 					      &_vte_terminal_codeset_changed_cb,
 					      (gpointer)terminal);
 	pvt->incoming = _vte_buffer_new();
-	pvt->pending = g_array_new(TRUE, TRUE, sizeof(gunichar));
+	pvt->pending = g_array_new(FALSE, FALSE, sizeof(gunichar));
 	pvt->cursor_blink_tag = VTE_INVALID_SOURCE;
 	pvt->coalesce_timeout = VTE_INVALID_SOURCE;
 	pvt->display_timeout = VTE_INVALID_SOURCE;
@@ -6764,7 +6764,7 @@ #endif
 	pvt->cursor_blink_timeout = 500;
 
 	/* Matching data. */
-	pvt->match_regexes = g_array_new(FALSE, TRUE,
+	pvt->match_regexes = g_array_new(FALSE, FALSE,
 					 sizeof(struct vte_match_regex));
 	pvt->match_previous = -1;
 	vte_terminal_match_hilite_clear(terminal);
@@ -10388,7 +10388,7 @@ vte_terminal_set_word_chars(VteTerminal 
 	if (terminal->pvt->word_chars != NULL) {
 		g_array_free(terminal->pvt->word_chars, TRUE);
 	}
-	terminal->pvt->word_chars = g_array_new(FALSE, TRUE,
+	terminal->pvt->word_chars = g_array_new(FALSE, FALSE,
 						sizeof(VteWordCharRange));
 	/* Special case: if spec is NULL, try to do the right thing. */
 	if ((spec == NULL) || (strlen(spec) == 0)) {
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 6be937c..c0db59a 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -314,26 +314,23 @@ vte_terminal_accessible_update_private_d
 		 * them. */
 		if (priv->snapshot_characters != NULL) {
 			g_array_free(priv->snapshot_characters, TRUE);
-			priv->snapshot_characters = NULL;
 		}
-		priv->snapshot_characters = g_array_new(FALSE, TRUE, sizeof(int));
+		priv->snapshot_characters = g_array_new(FALSE, FALSE, sizeof(int));
 
 		/* Free the attribute lists and allocate a new array to hold
 		 * them. */
 		if (priv->snapshot_attributes != NULL) {
 			g_array_free(priv->snapshot_attributes, TRUE);
-			priv->snapshot_attributes = NULL;
 		}
-		priv->snapshot_attributes = g_array_new(FALSE, TRUE,
+		priv->snapshot_attributes = g_array_new(FALSE, FALSE,
 							sizeof(struct _VteCharAttributes));
 
 		/* Free the linebreak offsets and allocate a new array to hold
 		 * them. */
 		if (priv->snapshot_linebreaks != NULL) {
 			g_array_free(priv->snapshot_linebreaks, TRUE);
-			priv->snapshot_linebreaks = NULL;
 		}
-		priv->snapshot_linebreaks = g_array_new(FALSE, TRUE, sizeof(int));
+		priv->snapshot_linebreaks = g_array_new(FALSE, FALSE, sizeof(int));
 
 		/* Get a new view of the uber-label. */
 		tmp = vte_terminal_get_text_include_trailing_spaces(terminal,
diff --git a/src/vtefc.c b/src/vtefc.c
index 3b8c362..bb9e5c0 100644
--- a/src/vtefc.c
+++ b/src/vtefc.c
@@ -404,7 +404,7 @@ gboolean
 _vte_fc_patterns_from_pango_font_desc(GtkWidget *widget,
 				      const PangoFontDescription *font_desc,
 				      VteTerminalAntiAlias antialias,
-				      GArray *pattern_array,
+				      GPtrArray *pattern_array,
 				      _vte_fc_defaults_cb defaults_cb,
 				      gpointer defaults_data)
 
@@ -456,7 +456,7 @@ _vte_fc_patterns_from_pango_font_desc(Gt
 			_vte_fc_set_antialias(tmp, antialias);
 			save = FcPatternDuplicate(tmp);
 			FcPatternDestroy(tmp);
-			g_array_append_val(pattern_array, save);
+			g_ptr_array_add(pattern_array, save);
 		}
 		FcFontSetDestroy(fontset);
 		ret = TRUE;
@@ -471,7 +471,7 @@ _vte_fc_patterns_from_pango_font_desc(Gt
 			_vte_fc_set_antialias(tmp, antialias);
 			save = FcPatternDuplicate(tmp);
 			FcPatternDestroy(tmp);
-			g_array_append_val(pattern_array, save);
+			g_ptr_array_add(pattern_array, save);
 			ret = TRUE;
 		} else {
 			ret = FALSE;
diff --git a/src/vtefc.h b/src/vtefc.h
index b4f1acb..ca1d9b4 100644
--- a/src/vtefc.h
+++ b/src/vtefc.h
@@ -35,7 +35,7 @@ gboolean
 _vte_fc_patterns_from_pango_font_desc(GtkWidget *widget,
 				      const PangoFontDescription *font_desc,
 				      VteTerminalAntiAlias antialias,
-				      GArray *pattern_array,
+				      GPtrArray *pattern_array,
 				      _vte_fc_defaults_cb defaults_cb,
 				      gpointer defaults_data);
 
diff --git a/src/vteglyph.c b/src/vteglyph.c
index 65e415f..c1ab22f 100644
--- a/src/vteglyph.c
+++ b/src/vteglyph.c
@@ -57,7 +57,7 @@ _vte_glyph_cache_new(void)
 
 	ret = g_slice_new(struct _vte_glyph_cache);
 
-	ret->patterns = g_array_new(TRUE, TRUE, sizeof(FcPattern*));
+	ret->patterns = g_ptr_array_new();
 	ret->faces = NULL;
 	ret->cache = g_tree_new(_vte_direct_compare);
 	ret->ft_load_flags = 0;
@@ -98,11 +98,9 @@ _vte_glyph_cache_free(struct _vte_glyph_
 	/* Destroy the patterns. */
 	if (cache->patterns != NULL) {
 		for (i = 0; i < cache->patterns->len; i++) {
-			FcPatternDestroy(g_array_index(cache->patterns,
-						       FcPattern*,
-						       i));
+			FcPatternDestroy(g_ptr_array_index(cache->patterns, i));
 		}
-		g_array_free(cache->patterns, TRUE);
+		g_ptr_array_free(cache->patterns, TRUE);
 	}
 
 	/* Close all faces. */
@@ -135,7 +133,7 @@ _vte_glyph_cache_set_font_description(Gt
 	double dpi, size;
 	GList *iter;
 	FcPattern *pattern;
-	GArray *patterns;
+	GPtrArray *patterns;
 	FT_Face face;
 	gunichar double_wide_characters[] = {VTE_DRAW_DOUBLE_WIDE_CHARACTERS};
 
@@ -143,19 +141,19 @@ _vte_glyph_cache_set_font_description(Gt
 	g_return_if_fail(fontdesc != NULL);
 
 	/* Convert the font description to a sorted set of patterns. */
-	patterns = g_array_new(TRUE, TRUE, sizeof(FcPattern*));
+	patterns = g_ptr_array_new();
 	if (!_vte_fc_patterns_from_pango_font_desc(widget, fontdesc,
 						   antialias,
 						   patterns,
 						   defaults_cb,
 						   defaults_data)) {
-		g_array_free(patterns, TRUE);
+		g_ptr_array_free(patterns, TRUE);
 		g_assert_not_reached();
 	}
 
 	/* Set the pattern list. */
 	if (cache->patterns != NULL) {
-		g_array_free(cache->patterns, TRUE);
+		g_ptr_array_free(cache->patterns, TRUE);
 	}
 	cache->patterns = patterns;
 
@@ -178,7 +176,7 @@ _vte_glyph_cache_set_font_description(Gt
 
 	/* Open the all of the faces to which the patterns resolve. */
 	for (i = 0; i < cache->patterns->len; i++) {
-		pattern = g_array_index(cache->patterns, FcPattern*, i);
+		pattern = g_ptr_array_index(cache->patterns, i);
 		j = 0;
 		while (FcPatternGetString(pattern, FC_FILE, j,
 					  &facefile) == FcResultMatch) {
@@ -219,7 +217,7 @@ _vte_glyph_cache_set_font_description(Gt
 	cache->ft_load_flags = 0;
 	cache->ft_render_flags = 0;
 	i = 0;
-	pattern = g_array_index(cache->patterns, FcPattern*, 0);
+	pattern = g_ptr_array_index(cache->patterns, 0);
 	/* Read and set the "use the autohinter", er, hint. */
 #if defined(FC_AUTOHINT) && defined(FT_LOAD_FORCE_AUTOHINT)
 	if (FcPatternGetBool(pattern, FC_AUTOHINT, 0, &i) == FcResultMatch) {
diff --git a/src/vteglyph.h b/src/vteglyph.h
index bf4d794..96af383 100644
--- a/src/vteglyph.h
+++ b/src/vteglyph.h
@@ -54,7 +54,7 @@ struct _vte_glyph {
 };
 
 struct _vte_glyph_cache {
-	GArray *patterns;
+	GPtrArray *patterns;
 	GList *faces;
 	GTree *cache;
 	gint ft_load_flags;
diff --git a/src/vteregex.c b/src/vteregex.c
index 879949d..7a077aa 100644
--- a/src/vteregex.c
+++ b/src/vteregex.c
@@ -56,7 +56,7 @@ _vte_regex_sort_matches(struct _vte_rege
 	if (n_matches <= 1) {
 		return;
 	}
-	array = g_array_new(0, 0, sizeof(struct _vte_regex_match));
+	array = g_array_new(FALSE, FALSE, sizeof(struct _vte_regex_match));
 	g_array_append_vals(array, matches, n_matches);
 	g_array_sort(array, compare_matches);
 	memmove(matches, array->data,
diff --git a/src/vtexft.c b/src/vtexft.c
index 8de6002..985bb67 100644
--- a/src/vtexft.c
+++ b/src/vtexft.c
@@ -43,8 +43,8 @@ #define CHAR_WIDTH_FUDGE 10
 
 struct _vte_xft_font {
 	GdkDisplay *display;
-	GArray *patterns;
-	GArray *fonts;
+	GPtrArray *patterns;
+	GPtrArray *fonts;
 	VteTree *fontmap;
 	VteTree *widths;
 };
@@ -94,19 +94,19 @@ _vte_xft_font_open(GtkWidget *widget, co
 		   VteTerminalAntiAlias antialias)
 {
 	struct _vte_xft_font *font;
-	GArray *patterns;
+	GPtrArray *patterns;
 
-	patterns = g_array_new(TRUE, TRUE, sizeof(FcPattern*));
+	patterns = g_ptr_array_new();
 	if (!_vte_fc_patterns_from_pango_font_desc(widget, fontdesc, antialias,
 						   patterns, NULL, NULL)) {
-		g_array_free(patterns, TRUE);
+		g_ptr_array_free(patterns, TRUE);
 		return NULL;
 	}
 
-	font = g_slice_new0(struct _vte_xft_font);
+	font = g_slice_new(struct _vte_xft_font);
 	font->display = gtk_widget_get_display(widget);
 	font->patterns = patterns;
-	font->fonts = g_array_new(TRUE, TRUE, sizeof(XftFont*));
+	font->fonts = g_ptr_array_new();
 	font->fontmap = _vte_tree_new(_vte_xft_direct_compare);
 	font->widths = _vte_tree_new(_vte_xft_direct_compare);
 
@@ -123,23 +123,23 @@ _vte_xft_font_close(struct _vte_xft_font
 	int i;
 
 	for (i = 0; i < font->patterns->len; i++) {
-		pattern = g_array_index(font->patterns, FcPattern*, i);
+		pattern = g_ptr_array_index(font->patterns, i);
 		if (pattern == NULL) {
 			continue;
 		}
 		FcPatternDestroy(pattern);
 	}
-	g_array_free(font->patterns, TRUE);
+	g_ptr_array_free(font->patterns, TRUE);
 
 	gdisplay = gdk_display_get_default();
 	display = gdk_x11_display_get_xdisplay(gdisplay);
 	for (i = 0; i < font->fonts->len; i++) {
-		ftfont = g_array_index(font->fonts, XftFont*, i);
+		ftfont = g_ptr_array_index(font->fonts, i);
 		if (ftfont != NULL) {
 			XftFontClose(display, ftfont);
 		}
 	}
-	g_array_free(font->fonts, TRUE);
+	g_ptr_array_free(font->fonts, TRUE);
 
 	_vte_tree_destroy(font->fontmap);
 	_vte_tree_destroy(font->widths);
@@ -152,7 +152,7 @@ _vte_xft_font_for_char(struct _vte_xft_f
 {
 	int i;
 	XftFont *ftfont;
-	FcPattern **patternp;
+	FcPattern *pattern;
 	GdkDisplay *gdisplay;
 	Display *display;
 	gpointer p = GINT_TO_POINTER(c);
@@ -164,17 +164,14 @@ _vte_xft_font_for_char(struct _vte_xft_f
 		/* Checked before, no luck. */
 		case -FONT_INDEX_FUDGE:
 			if (font->fonts->len > 0) {
-				return g_array_index(font->fonts,
-						     XftFont *,
-						     0);
+				return g_ptr_array_index(font->fonts, 0);
 			} else {
 				/* What to do? */
 				g_assert_not_reached();
 			}
 		/* Matched before. */
 		default:
-			return g_array_index(font->fonts,
-					     XftFont *,
+			return g_ptr_array_index(font->fonts,
 					     i - FONT_INDEX_FUDGE);
 		}
 	}
@@ -183,7 +180,7 @@ _vte_xft_font_for_char(struct _vte_xft_f
 	gdisplay = gdk_display_get_default();
 	display = gdk_x11_display_get_xdisplay(gdisplay);
 	for (i = 0; i < font->fonts->len; i++) {
-		ftfont = g_array_index(font->fonts, XftFont *, i);
+		ftfont = g_ptr_array_index(font->fonts, i);
 		if ((ftfont != NULL) &&
 		    (_vte_xft_char_exists(font, ftfont, c))) {
 			break;
@@ -195,7 +192,7 @@ _vte_xft_font_for_char(struct _vte_xft_f
 		_vte_tree_insert(font->fontmap,
 			      p,
 			      GINT_TO_POINTER(i + FONT_INDEX_FUDGE));
-		ftfont = g_array_index(font->fonts, XftFont *, i);
+		ftfont = g_ptr_array_index(font->fonts, i);
 		if (ftfont != NULL) {
 			return ftfont;
 		} else {
@@ -205,13 +202,13 @@ _vte_xft_font_for_char(struct _vte_xft_f
 
 	/* Look the character up in other fonts. */
 	for (i = font->fonts->len; i < font->patterns->len; i++) {
-		patternp = &g_array_index(font->patterns, FcPattern *, i);
-		ftfont = XftFontOpenPattern(display, *patternp);
+		ftfont = XftFontOpenPattern(display,
+			       	g_ptr_array_index(font->patterns, i));
 		/* If the font was opened, it owns the pattern. */
 		if (ftfont != NULL) {
-			*patternp = NULL;
+			g_ptr_array_index(font->patterns, i) = NULL;
 		}
-		g_array_append_val(font->fonts, ftfont);
+		g_ptr_array_add(font->fonts, ftfont);
 		if ((ftfont != NULL) &&
 		    (_vte_xft_char_exists(font, ftfont, c))) {
 			break;
@@ -224,9 +221,7 @@ _vte_xft_font_for_char(struct _vte_xft_f
 			      p,
 			      GINT_TO_POINTER(-FONT_INDEX_FUDGE));
 		if (font->fonts->len > 0) {
-			return g_array_index(font->fonts,
-					     XftFont *,
-					     0);
+			return g_ptr_array_index(font->fonts, 0);
 		} else {
 			/* What to do? */
 			g_assert_not_reached();
@@ -239,7 +234,7 @@ _vte_xft_font_for_char(struct _vte_xft_f
 
 	/* Return the match. */
 	if (i < font->fonts->len) {
-		return g_array_index(font->fonts, XftFont *, i);
+		return g_ptr_array_index(font->fonts, i);
 	} else {
 		return NULL;
 	}
