# EnsureLocalCapacity(int)

> Ensures that at least a given number of local references can be created in the current thread.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AndroidJNIModule

```csharp
public static int EnsureLocalCapacity(int capacity)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The minimum number of local references the current thread can hold.

### Returns

| Type                                                       | Description                                   |
| ---------------------------------------------------------- | --------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Zero on success. A negative value on failure. |

### Remarks

Additional Resources: [Java Native Interface Specification (Oracle)](http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html)
