LaKraven / LKSL

LaKraven Studios Standard Library
http://otapi.com
Other
51 stars 15 forks source link

Generics Redux - TLKListCompactor #109

Closed LaKraven closed 6 years ago

LaKraven commented 9 years ago

Takes responsibility for dictating how the Array contained in its owning TLKListBase type is to be compacted as items are removed.

TLKListBase will provide a property called CapacityCompactorType of type TLKListCompactorType defined as

  TLKListCompactorType = class of TLKListCompactor;

The default Capacity Compactor will simply deallocate one block of memory from the Array each time an Item is removed (not too bad for single-threaded systems, but pretty poor for large and multi-threaded systems).

Numerous descendants of TLKListCompactor will be provided as a standard part of the LKSL, but implementing developers can also define their own to suit specific requirements.

LaKraven commented 9 years ago

Related: #107 Related: #108 Related: #110