Re: Memory Leak with GetEncoding

Giganews Newsgroups
Subject: Re: Memory Leak with GetEncoding
Posted by:  Remy Lebeau \(Indy Team\) (re…@lebeausoftware.org)
Date: Tue, 13 Jul 2010

"Christian Kaufmann" <christian.kaufma…@gmx.net> wrote in message
news:g6uo36trkt0jvlrudetoc7v7612ngtde…@4ax.com...

> I noticed a memory leak with the latest Indy source:

The CharsetToEncoding() function is meant to return a new TIdTextEncoding
object each time it is called.  It is the calling code's responsibility to
free that object when done using it.

> The problem is TEncoding.GetEncoding, which creates a new object,
> that has to be freed by the calling method.

Where is CharsetToEncoding() being called from that the object is not being
freed?  Your call stack does not show that.

--
Remy Lebeau (TeamB)

Replies

In response to

Memory Leak with GetEncoding posted by Christian Kaufmann on Tue, 13 Jul 2010