<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>RemoveObject</title>
    <category>Objects</category>
    <subcat>Existence</subcat>
    <version>5.1 OC</version>
    <syntax>
      <rtype>void</rtype>
      <params>
        <param>
          <type>bool</type>
          <name>eject_contents</name>
          <desc>If <code>true</code>, the object's contents is exited before deletion of the object. Otherwise, the contents will be deleted as well.</desc>
          <optional />
        </param>
      </params>
    </syntax>
    <desc>Removes the calling object.</desc>
    <remark>When removing an object, numerous internal references to the object are cleared and any pointer to the object will become invalid. If you have stored a pointer to this object (e.g. in thread local script) you must no longer use this pointer after deletion of the object. If an object removes itself by script it should not execute any more script commands following the removal. The deleting function should immediately end with return.<br/>If the object is a valid crew member at the time of removal, the associated info object in the crew list will not be marked as 'killed', meaning a subsequent call to <funclink>MakeCrewMember</funclink>() might reuse the same crew info. To properly kill a clonk until the end of a round use <funclink>Kill</funclink>().</remark>
    <related>
      <funclink>Explode</funclink>
      <funclink>CreateObject</funclink>
      <funclink>Kill</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2002-08</date>
</funcs>
