---
title: Cleanup()
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: current
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/scripting/lifecyclemanagement/codegen/classautocleanup/cleanup
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/scripting/lifecyclemanagement/codegen/classautocleanup/cleanup.md
last_updated: 2026-10-20
generated_at: 2026-11-03T20:19:35.957Z
locale: en-us
---

# Cleanup()

> Resets the static state of the class that the code generator produced this cleanup for. Unity calls this method; don't call it directly.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Scripting.LifecycleManagement.CodeGen](/engine/7000.0/script-reference/unity/scripting/lifecyclemanagement/codegen.md)
* **Assembly:** Unity.Scripting

```csharp
public abstract void Cleanup()
```
