how to release hashtable object ? #5
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BeRo1985/pasmp#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Obj := TTestObject.Create;
Obj.Name := 'James';
ObjectHashTable := TPasMPHashTable<string, TObject>.Create();
try
ObjectHashTable.SetKeyValue('James', Obj);
if ObjectHashTable.GetKeyValue('James', objout) then
begin
Writeln('Found Object...');
end
else
Writeln('not Found Object...');
finally
ObjectHashTable.Free;
end;
Writeln(Obj.Name);
how to Iterative HashTable Object ?
To do this, you have to add a list of these objects yourself, because otherwise it would break the thread-safe principle of this PasMP hash-table construct, or at least it would make the implementation of it more complex, and thus possibly also slower, because more sync zones would be needed then, for to be able to provide such functionality in a thread-safe hash-table at all. Because one thing you don't want, locks or more locks.
Okay, I understand. Thank you