On Sun, 21 May 2023, Hairy Pixels via fpc-pascal wrote:
On May 21, 2023, at 2:47 PM, Michael Van Canneyt via fpc-pascal
wrote:
Your example will leak memory in any case, even if there is no exception,
since you're not freeing the object anywhere..
doh, dumb example on my behalf.
As
> On May 21, 2023, at 2:47 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> Your example will leak memory in any case, even if there is no exception,
> since you're not freeing the object anywhere..
doh, dumb example on my behalf.
>
> Assuming the result of A is not used outside of Test
On Sun, 21 May 2023, Hairy Pixels via fpc-pascal wrote:
I've never really used exceptions myself in Pascal (with the exception of
breaking out of deeply recursive function calls) so I don't know all the rules.
In this example lets say you call Test() which allocates some memory and
then cal