Title: Re: TCustomFreeTypeFontCollection Enumerator
Post by: jamie on June 02, 2019, 12:27:28 am
Yes you fingered it out :)
You can even write your enumerators in your classes that you make, all you need is the GetEnumerator function
That allows the loop counter using "IN" to function.
http://wiki.freepascal.org/for-in_loop
Title: Re: TCustomFreeTypeFontCollection Enumerator
Post by: devEric69 on June 02, 2019, 09:53:12 am
Nice insight. And just as a reminder, for those who are "paranoid" and want to free the memory by themselves, once the interface is used (without letting the interfaces's _refcount do its job as a "garbage collector"), you must assign the interface's variable with nil to free it, like: