Allowing iteration without generating any garbage

前端 未结 7 1203
时光取名叫无心
时光取名叫无心 2021-02-01 04:49

I have the following code in an object pool that implements the IEnumerable interface.

public IEnumerable ActiveNodes
{
    get
    {
        for (int i         


        
7条回答
  •  南方客
    南方客 (楼主)
    2021-02-01 05:07

    Does it have to be IEnumerable? Will refactoring to an array with good old indexed acecss help?

提交回复
热议问题