Discussion:
Memory leak?
(too old to reply)
Alien
2007-03-31 18:39:03 UTC
Permalink
Using Delphi7

I am using FastMM4 and it shows thet I am getting a memory leak with the code below.
What can I do to fix it with your help that is.

procedure TProject1.GetMyPostedMid; ///
var
P, Q, Temp: PChar;
XFace: array[0..1024] of Char;
begin
P := ReadWrite.GetText; // ReadWrite is a TStringList
Q := StrNew(P);
begin
P := StrPos(Q, 'Message-ID: ');
if P <> nil then
P := P + 12;
Temp := StrPos(P, #13#10);
Temp^ := #0;
StrLCopy(XFace, P, SizeOf(XFace) - 1);
Memo1.Lines.Add(Trim(XFace)); // Adds the Message-ID: <***@watever> to Memo1
end;
end;
--
-A-l-i-e-n-
Rob Kennedy
2007-04-01 00:49:37 UTC
Permalink
Post by Alien
I am using FastMM4 and it shows thet I am getting a memory leak with the code below.
What can I do to fix it with your help that is.
I already answered you in another newsgroup.
--
Rob
Loading...