Skip to content

Commit 598d36f

Browse files
AnthonyLeonardoGraciosetton
authored andcommitted
V624-007: clear gnatpp's template tables
This fixes a memory leak.
1 parent 32bc3f4 commit 598d36f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/ada/lsp-ada_contexts.adb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ with Langkit_Support.Slocs;
3737

3838
with Utils.Command_Lines.Common;
3939

40+
with Pp.Actions;
41+
4042
package body LSP.Ada_Contexts is
4143

4244
Indexing_Trace : constant Trace_Handle := Create ("ALS.INDEXING", Off);
@@ -890,8 +892,11 @@ package body LSP.Ada_Contexts is
890892
Self.Source_Dirs.Clear;
891893
Self.Tree := null;
892894

893-
-- Destroy GnatPP command line
895+
-- Destroy gnatpp's command line
894896
Utils.Command_Lines.Clear (Self.PP_Options);
897+
898+
-- Cleanup gnatpp's template tables
899+
Pp.Actions.Clear_Template_Tables;
895900
end Free;
896901

897902
-----------------

0 commit comments

Comments
 (0)