Wagner,
I the following:
procedure TNaharTasks.ProcessTasks;
var
Tasks: TList<TEntityTask>;
Task: TEntityTask;
begin
Tasks := Model.DataView['tasks.active.list'].AsList as TList<TEntityTask>;
try
for Task in Tasks do
if Now > Task.Start then
Start(Task)
finally
Tasks.Free;
end;
end;
where Model.DataView is this:
result.AsList := OManager.Find<TEntityTask>.Where(TLinq.Eq('active', true) and not TLinq.Eq('running', true)).AddOrder(TOrder.Asc('start')).List;
The is list is generated according the query.
The problem is that Tasks.Free raises an "Invalid pointer operation", and looks loke it makes my object get released (handled by an refcount interface).
That is strange for me. If I remove that Tasks.Free it works. that is not going to be a memory leak?