On Mon, 10 Sep 2012 21:37:49 +0200
Sönke Ludwig sludwig@rejectedsoftware.com wrote:

There were two or three places where memory was leaking. The current
master now uses malloc/free for almost all per-request allocations
instead of the GC. Memory usage on Windows now stayed absolutely
constant for 1.000.000 requests on my machine (about 10 MB virtual and
4,7 MB ram).

Nice!

I want to make the manual memory management optinal though because it
implies that no data of a HttpServerRequest must be stored outside of
the request handler function.

What about just passing the HttpServerRequest to the request handler as
a scope param? That way people can still do whatever they want with it,
but the compiler makes sure they properly dup anything they want an
escaping reference to. By contrast, a mem-leeky "HttpServerRequest that
can escape the request handler" doesn't sound like it would be
particularly useful to anyone.