In case when collection has string or variant element data type, memory leaks
occurs if collections is used as parameter in Parallel.ForEach.
Example to reproduce error:
var
oct : IOmniBlockingCollection;
begin
oct := TOmniBlockingCollection.Create();
oct.Add('1234');
oct.CompleteAdding;
Parallel.ForEach(oct).Execute(
procedure(const value: TOmniValue)
begin
end
);
oct := nil;
end;
FastMM reports line oct.Add('1234') as source line, and TOmniStringData,
UnicodeString as class associated with leak.
Curious thing is that there is no leak when :
- collection has simple type (f.e. integer) and ForEach is called
- ForEach is not called
Original issue reported on code.google.com by marcin.r...@gmail.com on 2 Jan 2015 at 10:49
Original issue reported on code.google.com by
marcin.r...@gmail.com
on 2 Jan 2015 at 10:49