On Sun, Feb 26, 2017 at 08:31:37AM +0100, Alexander Burger wrote:
>       (let A (bar (copy Lst))
>          (off Lst)
>          (doSomethingWithTheCopy)
>          ...
> 
> With (off Lst) *one* refernce to the list is cleared, but the list will be
> garbage collected only when the *last* reference is gone, which is not under
> control of 'foo'.

Of course, if you *know* that 'Lst' is not owned by anybody else, i.e. it was
freshly created by reading or list manipulations etc., you don't need to copy it
at all in the first place. 'copy' is used rather seldom, in cases where you want
to do destructive operations on list that might be owned by someone else.

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

Reply via email to