-
There is a bug in THashMap.Clear method. There is code:
FBuckets[I].Count := 0;
for J := 0 to FBuckets[I].Count-1 do
begin
FBuckets[I].Entries[J].Key := nil; // Free key ?
FreeObject(FBuckets[I].Entries[J].Value);
end;
but that FBuckets[I].Count := 0; should obviously be
AFTER the cycle.
2004-04-26 13:38:04 UTC in The Delphi Container Library
-
This would prove to be really useful to add
EnterCriticalSection function declaration to any interface
which is related to objects with thread-safety support.
So far, I see no way to enter critical section of, say
TLinkedList, which is referenced via Interface.
For example:
...
Var
MyList:IList;
...
MyList:=TLinkedList.Create;
...
Now I need to make sure noone will...
2003-11-01 20:35:02 UTC in The Delphi Container Library
-
It seems that /at least/ TStrHashMap.Remove doesn't
free memory occupied by removed object, even if
FOwnsObjects is TRUE.
Quick hack to fix that is to replace following code in
TStrHashMap.Remove:
if not FOwnsObjects then
Result := Bucket.Entries[I].Value;
System.Move(Bucket.Entries[I + 1], Bucket.Entries
[I],
(Bucket.Count - I) * SizeOf(TStrEntry));.
2003-10-05 19:24:34 UTC in The Delphi Container Library
-
This would be nice to add a methods to turn true and
false FOwnsObjects variable, so you may choose should
your list/hasn/etc frees object, or you should do it
yourself. It is useful, for example, when you'd like to
move some object from one list to another.
2003-09-22 17:21:45 UTC in The Delphi Container Library
-
Logged In: YES
user_id=154379
Sorry, I just fired refresh on that page, and SourceForge
submitted it second time. Just delete THIS one :)
2003-09-22 04:03:55 UTC in The Delphi Container Library
-
Removing last object from the linked list doesn't update
FEnd variable, so it STILL points at already removed
item, and adding another object doesn't work right.
So, in TLinkedList.Remove(AObject: TObject) instead of
if Old <> nil then
Old.Next := Current.Next;
else
FStart := Current.Next;
It should be
if Old <> nil then
Begin.
2003-09-22 03:58:49 UTC in The Delphi Container Library
-
Removing last object from the linked list doesn't update
FEnd variable, so it STILL points at already removed
item, and adding another object doesn't work right.
So, in TLinkedList.Remove(AObject: TObject) instead of
if Old <> nil then
Old.Next := Current.Next;
else
FStart := Current.Next;
It should be
if Old <> nil then
Begin.
2003-09-21 20:08:38 UTC in The Delphi Container Library
-
I would like to have posibility to suppress command's messages when trigger is successfully done. For example, I need to allow only certain objects to be put into certain container. When I deny them to be put in the special with preput_XXXX trigger with return_invalid_criteria() then everything is allright, since I notified player via send_actor myself. But I still see "You put the...
2002-02-09 19:13:01 UTC in AIME MUD engine
-
It would be nice if we could choose which genders certain race has during its creation. I could imagine race of only males of females, and human of neuter gender sounds just... strange. :)
2002-02-06 04:51:33 UTC in AIME MUD engine
-
How can I display several sequental messages to player each followed by a pause? Say character activates some special which displays first message, waits for 3 seconds, displays second message, waits for 3 seconds and finally transfers him somewhere. Ideally, during all this time player shouldn't be able to do anything. Neither go, nor look nor anything else. Just wait until (s)he'll be...
2002-02-05 16:20:06 UTC in AIME MUD engine