Memory leak TIdReplySMTP

Giganews Newsgroups
Subject: Memory leak TIdReplySMTP
Posted by:  Dennis (dennis.rus…
Date: Thu, 26 Apr 2007

There seems to be a memoryleak in TIdReplySMTP.
When created in TidTCPConnection with the function call
    FGreeting := FReplyClass.Create(nil, nil);

both constructor are called and both of them do
    FEnhancedCode := TIdSMTPEnhancedCode.Create;

At the first constructor the FEnhancedCode is nil, but at the second
constructor it is assigned(by the other constructor)
The second constructor obscures the first created  FEnhancedCode making it
impossible to free it.

I think TIdReply.Create calls the other constructor.