> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getdeletedactors

```luau theme={null}
getdeletedactors(): {Actor}
```

Returns a table of every actor that has been deleted from the game hierarchy but still remains referenced in memory.

## Returns

`{Actor}` - An array of deleted Actor instances.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  -- Print names of all deleted actors in memory
  for _, actor in ipairs(getdeletedactors()) do
      print(actor.Name)
  end
  ```

  ```luau Example 2 theme={null}
  -- Clear memory references to deleted actors
  local deleted = getdeletedactors()
  print("Total deleted actors in memory: " .. #deleted)
  ```
</CodeGroup>

<Tip>
  Deleted actors can be a source of memory leaks if references to them are kept alive in Lua scripts.
</Tip>
