Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AnsiString Memory leaks nightmare

59 views
Skip to first unread message

Zdenek Vasku

unread,
Apr 1, 2008, 9:34:12 AM4/1/08
to
Hello,

we are developing application in D2006 (also apply on 2007,2005
versions) and after testing with AQTime we have a lot of memory leaks
with AsString (TStringField) and also with stupid string manipulation
like a:=b+' '+a; etc.

Is this a general problem of Huge ansistrings or AQTime problem (I
think not). These leaks take about 100k and it's a problem.

All code can not be changed to var parameters.

For example:

function InsertPP(aJmPole: AnsiString): Boolean;
var
tmpPP:TPopis_DBFld;
begin
tmpPP := TPopis_DBFld.Create;
with tmpPP do begin
fJmPole := aJmPole; <- leak
end;
FreeAndNil(tmpPP);
end;

Thanks for sugestions
Zdenek
--

0 new messages