I anybody else experiencing memory leaks when calling MarketBook?
I inserted this code in my program and it shows a loss of over 8k on each call to MarketBook.
function MemoryUsed: cardinal;
var
st: TMemoryManagerState;
sb: TSmallBlockTypeState;
begin
GetMemoryManagerState(st);
result := st.TotalAllocatedMediumBlockSize + st.TotalAllocatedLargeBlockSize;
for sb in st.SmallBlockTypeStates do begin
result := result + sb.UseableBlockSize * sb.AllocatedBlockCount;
end;
end;
I adapted the Delphi Client example code because it appeared easier to do that than to create a whole bunch of new code to do the same thing and now I’m haemorrhaging memory.
Any thoughts?
Has anyone else run the Delphi Client Example to get prices repeatedly?
Kind Regards
OzPunter
I inserted this code in my program and it shows a loss of over 8k on each call to MarketBook.
function MemoryUsed: cardinal;
var
st: TMemoryManagerState;
sb: TSmallBlockTypeState;
begin
GetMemoryManagerState(st);
result := st.TotalAllocatedMediumBlockSize + st.TotalAllocatedLargeBlockSize;
for sb in st.SmallBlockTypeStates do begin
result := result + sb.UseableBlockSize * sb.AllocatedBlockCount;
end;
end;
I adapted the Delphi Client example code because it appeared easier to do that than to create a whole bunch of new code to do the same thing and now I’m haemorrhaging memory.
Any thoughts?
Has anyone else run the Delphi Client Example to get prices repeatedly?
Kind Regards
OzPunter


Comment