Re: (close-output-port stringport)

From: Erick Gallesio <eg_at_kaolin.unice.fr>
Date: Tue, 16 May 1995 19:53:47 +0100

> Johann Friedrich Heinrichmeyer writes
> it would be very elegant to manipulate strings with the aid of ports
> derived from (open-output-string). This port collects chars ... . What
> if i want to "clear" it . On my linux version, after (close-output-port
> stringport) i get an empty string from (get-output-string
> stringport). On the sun there is a coredump.

This is a bug. I will fix it

>My intention is to clear
> the port very often. Is garbage collection cheap for stringports? Is it
> better to simply (let ...) it be a new one, like in the example of the
> documentation?

GC collection is really cheap for stringport. The close was not really
necessary. It was provided for symetry with files.

                -- Erick
Received on Tue May 16 1995 - 19:53:48 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST