On Fri, Jan 30, 2015 at 5:32 PM, Alex Shinn <alexsh...@gmail.com> wrote:

> From the user perspective there is no separation between
> the port and any backing store, and they otherwise have no
> way to free the resources.  You should be able to reliably
> accumulate a very large port and free it, or alternately
> maintain many medium ports and not worry about them
> hogging memory after closing.
>


If you lose the reference to the port, won't the memory be GC'ed?

It is generally a bad practice to rely on freeing external resources, such
as file descriptors, by GC.  But for memory, usually we rely on GC.

Besides, there can be a variation that the user provides a backing storage
to a port (gauche's open-output-uvector allows that), so the association
between ports and its backing storage doesn't need to be that tight, though
you could argue that standard string port is a special case.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to