← Back to carmenta.com
Carmenta Engine SDK Documentation
×

TriangleCollection.Reserve Method

Preallocates space in the internal kernel array to avoid unnecessary memory reallocations.

Thread safety: This method is not thread-safe. Show

Reserve(System.Int32 size)

Preallocates space in the internal kernel array to avoid unnecessary memory reallocations.

Syntax

C#
public void Reserve (
    System.Int32 size
)

Parameters

size
Type: System.Int32
The number of elements that can be added to the collection without requiring reallocation of the internal kernel array.

Remarks

If you know beforehand how many elements you are going to add to a collection, call this method first to reserve the space needed. This will avoid unnecessary memory reallocations of the internal kernel array as the elements are added.

Platforms

Windows, Linux, Android

By accessing the information on this site you accept our terms and conditions and privacy policy.
This site uses cookies to enhance your experience and provide additional functionality.

Accept