VCL enhancements

I have just altered a VCL class in Delphi 5. This article will keep track of anything I change and why.

Make sure that the folder is in your library path or the altered units will not get compiled.

When using a TCollection with thousands of items, freeing the collection can take quite a while (10 seconds on my Duron 700 for 3000 items).

in Classes.pas change

procedure TCollection.RemoveItem(Item: TCollectionItem);


  Count: Integer;


  NotifyDesigner(Self, Item, opRemove);

  Count := FItems.Count;

  if (Count > 0) and (Item = FItems[Count - 1]) then

    FItems.Delete(Count - 1)



  Item.FCollection := nil;




Share this article!

Follow us!

Find more helpful articles: