Re: Memory Leak with GetEncoding

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

"Christian Kaufmann" <christian.kaufma…> wrote in message

> 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)


In response to

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