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

# cleardrawcache

> يمسح Real global Drawing object list. يتم وضع علامة destroyed على كل Drawing object متتبع، ويتم تحرير image resources عند وجودها، ويتم تفريغ object list. قد تبقى Lua references الحالية إلى Drawing objects التي تم مسحها موجودة، لكن objects لم تعد active Drawing objects. يسجل the Drawing API هذه API فقط عندما تكون the required rendering environment is active true؛ عندما يكون هذا الفحص false، يرجع initializer قبل إنشاء هذه globals.

<div className="real-function-page">
  ```lua theme={null}
  cleardrawcache()
  ```

  ## مثال

  Clear every Drawing object currently tracked by Real.

  ```lua theme={null}
  local square = Drawing.new("Square")
  square.Visible = true

  cleardrawcache()
  print(square.Visible)
  ```
</div>
