LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Michiel Helvensteijn <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Tue, 16 Jul 2013 21:26:46 +0200
text/plain (30 lines)
On Tue, Jul 16, 2013 at 7:56 PM, Bruno Le Floch <[log in to unmask]> wrote:

> Actually, this slight issue hints at a memory leak waiting to happen:
> TeX will never be able to know when all mentions of the unique name
> are gone, hence that name (and the associated contents) will need to
> remain forever.  This does not seem very safe.

Well, it's "safe", but it leaks memory, as you say. I do wonder how
much this matters in practice, given that LaTeX runs short batch-jobs
rather than continuous processes. But it is a valid concern.

> or one could write a package providing \pointer_arg:Nn (or something similar)
>      \pointer_arg:Nn \foo:n { ab\cd }

Indeed! A family of `\exp_args` like commands is probably the best way to go.

One of the arguments is, as you say, that the same library can provide
facilities for garbage-collection. Another argument, which just
occurred to me, is that I'll now have the full set of expl3 argument
specifiers at my disposal for expanding the value before putting it in
the pointer.

I will write this library at some point. I'm currently quite busy, though.