[gnome-builder] vala: Avoid ownership mismatches of container elements to fix some memleaks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vala: Avoid ownership mismatches of container elements to fix some memleaks
- Date: Thu, 5 Apr 2018 08:44:58 +0000 (UTC)
commit 6b736af9ccb91dbaf97f439f7dadcae62914043a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Apr 5 10:34:41 2018 +0200
vala: Avoid ownership mismatches of container elements to fix some memleaks
src/plugins/vala-pack/ide-vala-code-indexer.vala | 2 +-
src/plugins/vala-pack/ide-vala-index.vala | 2 +-
src/plugins/vala-pack/ide-vala-source-file.vala | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/vala-pack/ide-vala-code-indexer.vala
b/src/plugins/vala-pack/ide-vala-code-indexer.vala
index ad91a3b1b..2de540a21 100644
--- a/src/plugins/vala-pack/ide-vala-code-indexer.vala
+++ b/src/plugins/vala-pack/ide-vala-code-indexer.vala
@@ -102,7 +102,7 @@ namespace Ide
public async GLib.GenericArray<weak Ide.CodeIndexEntry> next_entries_async (GLib.Cancellable?
cancellable)
throws GLib.Error
{
- var ret = new GLib.GenericArray<Ide.CodeIndexEntry> ();
+ var ret = new GLib.GenericArray<unowned Ide.CodeIndexEntry> ();
for (;;)
{
diff --git a/src/plugins/vala-pack/ide-vala-index.vala b/src/plugins/vala-pack/ide-vala-index.vala
index be9bf1851..43e9d7226 100644
--- a/src/plugins/vala-pack/ide-vala-index.vala
+++ b/src/plugins/vala-pack/ide-vala-index.vala
@@ -284,7 +284,7 @@ namespace Ide
GLib.Cancellable? cancellable)
throws GLib.Error
{
- GLib.GenericArray<UnsavedFile>? unsaved_files_copy = null;
+ GLib.GenericArray<unowned UnsavedFile>? unsaved_files_copy = null;
if (unsaved_files != null) {
unsaved_files_copy = unsaved_files.to_array ();
diff --git a/src/plugins/vala-pack/ide-vala-source-file.vala b/src/plugins/vala-pack/ide-vala-source-file.vala
index 9572fb7ab..f36c71ff1 100644
--- a/src/plugins/vala-pack/ide-vala-source-file.vala
+++ b/src/plugins/vala-pack/ide-vala-source-file.vala
@@ -135,7 +135,7 @@ namespace Ide
public Ide.Diagnostics? diagnose ()
{
- var ar = new GLib.GenericArray<Ide.Diagnostic> ();
+ var ar = new GLib.GenericArray<unowned Ide.Diagnostic> ();
foreach (var diag in this.diagnostics) {
ar.add (diag);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]