[gnome-builder] clang: dispose completion chunk string



commit e6a29788cab8ae69b83e1cb6dc32a5c761c281e1
Author: Christian Hergert <chergert redhat com>
Date:   Mon Nov 7 11:21:08 2016 -0800

    clang: dispose completion chunk string
    
    We seemed to miss this when implementing the get_snippet() originally.
    But it appears we need to release the CXString from the completion
    proposal despite the clang-c/Index.h not being specific about the lifetime
    or ownership of the structure.

 plugins/clang/ide-clang-completion-item.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/clang/ide-clang-completion-item.c b/plugins/clang/ide-clang-completion-item.c
index e9d5f1f..97d95d8 100644
--- a/plugins/clang/ide-clang-completion-item.c
+++ b/plugins/clang/ide-clang-completion-item.c
@@ -297,6 +297,8 @@ ide_clang_completion_item_create_snippet (IdeClangCompletionItem *self)
         default:
           break;
         }
+
+      clang_disposeString (cxstr);
     }
 
   return snippet;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]