GpStuff 1.19 & GpLists 1.43
I’ll finish my short overview of changes in various Gp units with new GpStuff and GpLists. Let’s deal with the latter first. There were only two changes. Firstly, Slice, Walk and WalkKV enumerators got the step parameter. Now Delphi is really as powerful as Basic! Secondly, I’ve added method FreeObjects to the TStringList helper. It will walk the string list and free all associated objects – something that is not done automatically in the TStringList destructor. Very useful helper, if I can say so. procedure TGpStringListHelper.FreeObjects; Changes in GpStuff were more significant. There are new enumerator factories. EnumStrings allows you do do stuff like this: for s in EnumStrings(['one', 'two', 'three']) do EnumValues will do the same for integer arrays. EnumPairs is similar to EnumStrings but returns (key, value) pairs: var There is also EnumList, which enumerates lists of items (where the whole list itself is a string): for s in EnumList('one,two,"one,two,three"', ',', '"') do There were some changes in TGp4AlignedInt internals – now all values are integer, not cardinal (because underlying Windows implementation works with integers). There is also new function “Compare and Swap” (CAS) in TGp4AlignedInt and TGp8AlignedInt64 (which was previously called TGp8AlignedInt). Finally, there are new interface and class - IGpTraceable and TGpTraceable. type The TGpTraceable class helps me debug interface problems. It exposes GetRefCount function which returns reference count, and it can trigger debugger interrupt on each reference count change if TraceReferences property is set. function TGpTraceable._AddRef: integer;---Published under the Creative Commons Attribution 3.0 license Labels: Delphi, open source, programming |
0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home