Closed sunliusi closed 3 years ago
@sunliusi, I don't think Microsoft intends to add any new features to .NET Framework. You can post this API proposal at https://github.com/dotnet/runtime/issues/new/choose and they can then consider it for .NET 7.
.NET Framework 4.8 is the last version of .NET Framework, and no further versions will be released.
So, it's pretty clear that List\<T>.Reset(int size) won't be added there.
Thanks for reminding. I'll close it. @KalleOlaviNiemitalo
A large list can lead to high memory usage. ObjectPool can solve this problem. Is it possible to allow external resizing to reuse memory.
just like:
public class List : IList, System.Collections.IList, IReadOnlyList
{
private int _size;