Hi all,

On Fri, Nov 13, 2020 at 06:05:11PM +0100, Alexander Shendi wrote:
> I'm the wrong Alex (and I'm probably wrong),

You are not wrong (in any case ;)


> but I would think that memory allocated by malloc() isn't managed by the GC.
> IDK if you can install finalizers or something similar.

Indeed, that's also possible:

   (let P (%@ "malloc" 'P 99)
      (finally (%@ "free" NIL P)
         (struct ...)
         ... ) )

The free() will also be called upon throw or error exit.

But surely the (buf P ...) way is the most efficient one.

☺/ A!ex


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to