docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Resize

    Resize(int)

    Reallocates the underlying buffer if necessary. WriteCount is reset only if Capacity changes.

    Declaration
    public void Resize(int newCapacity)
    Parameters
    Type Name Description
    int newCapacity

    The new value for Capacity. Can be 0.

    Remarks

    When reallocation occurs, data is not copied over from the previous buffer. After a call to Resize, Capacity is always equal to the given newCapacity. Resize(0) will deallocate the underlying buffer.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)