From 2491bb7d8eff1dbc3d0639a05b8583c7e9e28d55 Mon Sep 17 00:00:00 2001 From: Serguei Rybin Date: Fri, 6 Apr 2007 11:23:43 +0200 Subject: lib.ads, lib.adb (Tree_Read): Release the memory occupied by the switches from previously loaded tree 2007-04-06 Serguei Rybin * lib.ads, lib.adb (Tree_Read): Release the memory occupied by the switches from previously loaded tree From-SVN: r123581 --- gcc/ada/lib.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/ada/lib.adb') diff --git a/gcc/ada/lib.adb b/gcc/ada/lib.adb index 069474f..1a92677 100644 --- a/gcc/ada/lib.adb +++ b/gcc/ada/lib.adb @@ -994,7 +994,12 @@ package body Lib is begin Units.Tree_Read; - -- Read Compilation_Switches table + -- Read Compilation_Switches table. First release the memory occupied + -- by the previously loaded switches. + + for J in Compilation_Switches.First .. Compilation_Switches.Last loop + Free (Compilation_Switches.Table (J)); + end loop; Tree_Read_Int (N); Compilation_Switches.Set_Last (N); -- cgit v1.1