Skip to content

Memory "leak" in readChar (PR#1483)

1 message · Brian Ripley

#
It's not really a memory leak, more that R_alloc was at the time
incorrectly documented and do_readchar needs to reset vmax.  (Rstreams
used .C, and that did reset vmax, whereas .Internal does not.)

It's actually being done rather inefficiently, as this seems an unusual
case.  For 1.6.0 I am planning on using alloca (where available) for this
sort of short-term buffer.

I'll put the two-line fix in for 1.5.0.
On Fri, 26 Apr 2002 hcp@met.ed.ac.uk wrote: