> On Dec 21, 2023, at 1:53 AM, Michael Van Canneyt via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > If you look at the generated code, you see that there is an implicit > try/finally block > and the finally block does a finalize.
Maybe I misunderstood but I thought they were supposed to be balanced with init calls. Is it the design of the compiler to allow multiple finalize calls and have the user keep track of it the underlying structure is really finalized or not? If you were doing things like deleting memory in the finalizer you would have a double free happen here. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal