Difference between revisions of "enet.host:destroy"

(Created page with "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 b...")
 
m (stylistic edit.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Destroys the [[enet.host | host]] structure and closes all of its connections.
 
Destroys the [[enet.host | host]] structure and closes all of its connections.
Do not call this directly!
+
This function is also ran automatically by lua's garbage collector, since it's an alias to ''host:__gc''.
This function is ran automatically by lua's garbage collector, but can be invoked indirectly by running collectgarbage() when all references to the [[enet.host | host]] are set to nil or are otherwise lost.
 
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
host:__gc()
+
host:destroy()
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
None
+
None.
 
=== Returns ===
 
=== Returns ===
None
+
Nothing.
  
 
== See Also ==
 
== See Also ==
Line 16: Line 15:
 
* [[enet.host]]
 
* [[enet.host]]
 
== Other Languages ==
 
== Other Languages ==
{{i18n|enet.host:channel_limit}}
+
{{i18n|enet.host:destroy}}

Latest revision as of 02:22, 30 October 2016

Destroys the host structure and closes all of its connections. This function is also ran automatically by lua's garbage collector, since it's an alias to host:__gc.

Function

Synopsis

host:destroy()

Arguments

None.

Returns

Nothing.

See Also

Other Languages