> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# destroy

APISummary
After `LynxView` becomes unavailable, you need to actively call this method to release the `LynxView` memory, otherwise there will be a memory leak.

## Syntax

### Android

```java
public void destroy();
```

### Desktop (C++)

Desktop C++ API does not expose a standalone `destroy()` method. Release the `LynxView` by destroying or resetting the owning C++ object.

```cpp
std::unique_ptr<lynx::pub::LynxView> view = builder.Build();
// ...
view.reset();
```

## Compatibility

**Compatibility Table**

**Query:** `lynx-native-api.lynx-view.destroy`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-view/destroy.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| destroy | Yes (1.0) | No | No | Yes (3.7) | Yes (3.7) | No |

**`destroy`**

manually destroy lynxView instance

**Specifications:**

