1
vote
Generic linked lists redux
Delphi Haven
– Do generics and typed pointers mix? Certainly, so long as you use a nested type: type TOuterType<T> = class public type PInnerType = ^TInnerType; TInnerType = record Value: T; end; end; OK, so the New/Dispose bug still holds, but that’s only a minor irritant. I’m not sure why I didn’t think of the nested type ‘trick’ before, and indeed, I’ve now noticed Alexandru Ciobanu uses this sort of thing in his Collections project (which, by the way, is well worth looking at generally). Better late than never though! Put to work, ...
Statistics
|
Visits by Source |
User Actions |



