---
title: "call-to-gc"
description: "Discourage explicit garbage collection."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# call-to-gc

<!-- Code generated by docs/scripts/generate-check-docs.go; DO NOT EDIT. -->

**Default severity:** `warning`

Discourage explicit garbage collection. Default: runtime.GC.

## Bad

```go
runtime.GC() // in normal application code
```

## Good

```go
buffer = nil // let Go collect it when appropriate
```

Source: https://strider.gempir.com/lints/call-to-gc/index.mdx
