<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.deltaworlds.com/index.php?action=history&amp;feed=atom&amp;title=Aw_term</id>
	<title>Aw term - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.deltaworlds.com/index.php?action=history&amp;feed=atom&amp;title=Aw_term"/>
	<link rel="alternate" type="text/html" href="https://wiki.deltaworlds.com/index.php?title=Aw_term&amp;action=history"/>
	<updated>2026-04-17T00:22:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.deltaworlds.com/index.php?title=Aw_term&amp;diff=196&amp;oldid=prev</id>
		<title>Xan: Created page with &quot;{{SDK added in|version=2.1|sdk=13|world=|universe=|browser=}}  __NOTOC__   void aw_term (void)  ==Description== Terminates use of the SDK.  ==Callback== None (returns immediately)  ==Notes== This method deallocates any resources used by instances that have been created. Instances are created using aw_create, aw_create_resolved and aw_server_admin. If a call is placed to this method from within a callback or event handler then it cou...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.deltaworlds.com/index.php?title=Aw_term&amp;diff=196&amp;oldid=prev"/>
		<updated>2025-04-07T19:25:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{SDK added in|version=2.1|sdk=13|world=|universe=|browser=}}  __NOTOC__   void aw_term (void)  ==Description== Terminates use of the SDK.  ==Callback== None (returns immediately)  ==Notes== This method deallocates any resources used by &lt;a href=&quot;/index.php?title=SDK_Multiple_Instances&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;SDK Multiple Instances (page does not exist)&quot;&gt;instances&lt;/a&gt; that have been created. Instances are created using &lt;a href=&quot;/index.php?title=Aw_create&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Aw create (page does not exist)&quot;&gt;aw_create&lt;/a&gt;, &lt;a href=&quot;/index.php?title=Aw_create_resolved&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Aw create resolved (page does not exist)&quot;&gt;aw_create_resolved&lt;/a&gt; and &lt;a href=&quot;/index.php?title=Aw_server_admin&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Aw server admin (page does not exist)&quot;&gt;aw_server_admin&lt;/a&gt;. If a call is placed to this method from within a callback or event handler then it cou...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{SDK added in|version=2.1|sdk=13|world=|universe=|browser=}}&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
 void aw_term (void)&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
Terminates use of the SDK.&lt;br /&gt;
&lt;br /&gt;
==Callback==&lt;br /&gt;
None (returns immediately)&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
This method deallocates any resources used by [[SDK_Multiple_Instances|instances]] that have been created. Instances are created using [[aw_create]], [[aw_create_resolved]] and [[aw_server_admin]]. If a call is placed to this method from within a callback or event handler then it could leave dangling pointers in the SDK. Possibly causing a general protection fault (GPF) when it tries to access memory that has been freed.&lt;br /&gt;
&lt;br /&gt;
Any installed callback or event handlers will remain and be used again if the SDK is initialized.&lt;br /&gt;
&lt;br /&gt;
The [[aw_destroy]] method should be used to safely destroy [[SDK_Multiple_Instances|instances]] from within callback or event handlers. This is because [[aw_destroy]] does not deallocate them at once. They merely get flagged as &amp;quot;destroyed&amp;quot; which stops the SDK from processing packets for them.&lt;br /&gt;
&lt;br /&gt;
Calling [[aw_destroy]] for all instances followed by [[aw_wait]] (0) is almost the same as calling aw_term. This is because [[aw_wait]] will deallocate instances marked as &amp;quot;destroyed&amp;quot;. Only difference is that it would not be necessary to call [[aw_init]] again before creating instances.&lt;br /&gt;
&lt;br /&gt;
Note that [[aw_destroy]] followed by [[aw_wait]] (0) within a callback or event handler is as bad as aw_term because both would deallocate the instance.&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
==Argument attributes==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
==Return values==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
==Returned attributes==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
 #include &amp;quot;Aw.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;[[Reason.h]]&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 int main (int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
   if ([[aw_init]] (AW_BUILD) != [[SDK Reason Codes#RC_SUCCESS|RC_SUCCESS]])&lt;br /&gt;
   {&lt;br /&gt;
     printf (&amp;quot;Build #%d of Aw.dll is required to run this bot.\n&amp;quot;, AW_BUILD);&lt;br /&gt;
     return 1;&lt;br /&gt;
   }&lt;br /&gt;
   &lt;br /&gt;
   /* ... */&lt;br /&gt;
   &lt;br /&gt;
   [[aw_term]] ();&lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[SDK_Application_Structure|Application structure]]&lt;br /&gt;
*[[aw_init]]&lt;br /&gt;
*[[aw_init_bind]]&lt;br /&gt;
*[[aw_create]]&lt;br /&gt;
*[[aw_create_resolved]]&lt;br /&gt;
*[[aw_server_admin]]&lt;br /&gt;
&lt;br /&gt;
[[Category: SDK Methods|T]]&lt;/div&gt;</summary>
		<author><name>Xan</name></author>
	</entry>
</feed>