---
title: queryReserve
framework: gameplaykit
role: symbol
role_heading: Instance Property
path: gameplaykit/gkrtree/queryreserve
---

# queryReserve

The number of elements to reserve space for when searching.

## Declaration

```swift
var queryReserve: Int { get set }
```

## Discussion

Discussion Use this property to optimize for search speed at the cost of memory usage during a search. With the default value of 1, when you use the elements(inBoundingRectMin:rectMax:) method, the tree examines potential search results one at a time. If you specify a larger number, the tree allocates additional memory to process several elements together when searching.

## See Also

### Searching for Elements

- [elements(inBoundingRectMin:rectMax:)](gameplaykit/gkrtree/elements(inboundingrectmin:rectmax:).md)
