# enet.host: gc

Destroys the host structure and closes all of its connections. Do not call this directly! This function is ran automatically by lua's garbage collector, but can be invoked indirectly by running collectgarbage() when all references to the host are set to nil or are otherwise lost.

## Function

### Synopsis

    host:__gc()

### Arguments

None

### Returns

None

## See Also

- lua-enet
- enet.host

##

Category:

- Functions