I have a collection derived from TCollection, implementing GetEnumerator so I can use it in a construction like
for lElem in lCollection do
The enumerator is derived from TObject, exactly like the standard enumerators supplied by Delphi and therefor doesn't have an owner.
The Delphi help mentions that if the enumerator supports IDisposable is it will be disposed of, but that is for .NET only of course.
What I was wondering is, how and when and by who the enumerator instance is freed?