From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c0567ec88842f790 X-Google-Attributes: gid103376,public From: Mats.Weber@elca-matrix.ch (Mats Weber) Subject: Re: Memory leak in porting VAX/VMS -> AXP/VMS Date: 1996/04/11 Message-ID: #1/1 X-Deja-AN: 146945342 references: organization: ELCA Matrix SA newsgroups: comp.lang.ada Date: 1996-04-11T00:00:00+00:00 List-Id: We just found the memory leak. It was in a function that converts a binary tree into an array, something like: function Equiv (L : Link) return List is begin if L = null then declare Null_List : List(1..0); begin return Null_List; end; else if Key_Of(Item) < Key_Of(L.Val) then return Equiv(L.Left); elsif Key_Of(Item) = Key_Of(L.Val) then if Equal(Item, L.Val) then return Equiv(L.Left) & L.Val & Equiv(L.Right); else return Equiv(L.Left) & Equiv(L.Right); end if; else return Equiv(L.Right); end if; end if; end Equiv; which was in a generic that was instantiated with a type with discriminants. I changed the code to remove the combination of "&" and recursion and now it doesn't leak memory anymore. I haven't yet tried version 3.3 of the VMS/AXP compiler to see if the bug has gone. Thanks to all those who answered.