Re: FCGI/perl memory leakage

Sven Verdoolaege (
Mon, 7 Apr 1997 17:25:29 +0200

Message-Id: <>
Date: Mon, 7 Apr 1997 17:25:29 +0200
From: (Sven Verdoolaege)
Subject: Re: FCGI/perl memory leakage
In-Reply-To: <>; from Sven Verdoolaege on Apr 2, 1997 15:03:53 +0200

On Apr 2, (Sven Verdoolaege) wrote:
> I think I've located the problem.
> perl is trying to be smart and postpones the desruction of hash elements
> till ... never in this case.

This is probably misinformation. The problem seem to be more involved,
but it does seem to be a perl problem.

> Quick solution is to uncomment the hv_delete in line 172 of FCGI.xs .
> This may have unwanted side effects.
Of course what meant was:
This will have side effects that may be unwanted.

Slightly better solution is to replace the hv_delete with

hv_store(hv, p, p1 - p, newSV(0), 0);

This way, you won't get old environment values, but you will
get empty values if the variable ever existed, so code
using exists or defined on %ENV elements won't work.