added Futures
This commit is contained in:
@@ -187,6 +187,10 @@ end;
|
||||
class operator TMycAtomicStack<T>.Finalize(var Dest: TMycAtomicStack<T>);
|
||||
begin
|
||||
Dest.Clear;
|
||||
if Dest.FSList <> nil then // Check if FSList was initialized
|
||||
begin
|
||||
Dest.FSList.Free; // Call instance method Free on FSList via Dest
|
||||
end;
|
||||
end;
|
||||
|
||||
function TMycAtomicStack<T>.Alloc: PItem;
|
||||
@@ -210,10 +214,6 @@ begin
|
||||
FreeMemAligned(item); // Global procedure
|
||||
item := PopPtr; // Call instance method PopPtr via Dest
|
||||
end;
|
||||
if FSList <> nil then // Check if FSList was initialized
|
||||
begin
|
||||
FSList.Free; // Call instance method Free on FSList via Dest
|
||||
end;
|
||||
end;
|
||||
|
||||
function TMycAtomicStack<T>.Pop: T;
|
||||
|
||||
Reference in New Issue
Block a user