Skip to content

ConfigurableArrayPool shoud use GC.AllocateUninitializedArray<T> #114116

@PavelCibulka

Description

@PavelCibulka

ConfigurableArrayPool shoud use GC.AllocateUninitializedArray instead of new T[].

SharedArrayPool use GC.AllocateUninitializedArray:

buffer = GC.AllocateUninitializedArray<T>(minimumLength);

There are four line with new T[] in ConfigurableArrayPool.cs. Probably all of them can be replaced with GC.AllocateUninitializedArray.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions