Re: leaking iconv handles, wv return type


Subject: Re: leaking iconv handles, wv return type
From: Thomas Fletcher (thomasf@qnx.com)
Date: Wed Nov 15 2000 - 07:42:53 CST


On Wed, 15 Nov 2000, Vlad Harchev wrote:

> On Tue, 14 Nov 2000, Thomas Briggs wrote:
>
> > > XAP_EncodingManager is assumed to be created no more than 3 times. So I
> > > didn't care about leaking iconv descriptors - they don't take a lot of
> > memory
> > > (no more than 100bytes each). I don't recommend spending time on bothering
> > to
> > > close those descriptors.
> >
> > I would normally refrain but such obvious flame bait, but I have to ask:
> > you can't be serious, can you?
>
> By serious, you mean "don't joke"? If I don't append smiley, then I don't
> joke. If you mean "be more responsible" - I am since I know that not
> releasing iconv handles won't make any harm except of additional 500 bytes of
> memory not returned to memory heap.

Or under an embedded system where the number of system
fd's is potentially limited, running out of file descriptors.
In a long running program (which AbiWord could potentially
be) then there is no reason that you shouldn't be cleaning
up after yourself. Compared to the time that we spend doing
other operations, the work of free() and close() are noise
and we should do everything we can to prevent the leak of
_any_ resource (be it memory or file descriptors). Addressing
this issue now will mean that someone won't have to deal with
it later when/if it becomes a problem.

Vlad, you are obviously a very capable developer ... why
are you against taking the 10 minutes that it would probably
take to properly address this issue?

Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 2b25 : Wed Nov 15 2000 - 07:40:19 CST