<deleteclass>

Purpose The <deleteclass> statement is used to delete class(es) from the run-time class memory. This has the effect of stripping behaviour from objects that were instantiated of the class. It is also a way of conserving class memory because you eliminate classes that are no longer needed.
Format <deleteclass>
   {comma-separated list of classes}
</deleteclass>
{comma-separated list of classes} a comma-separated list of classes or an expression that yields such a list.
Example #1 <class name="XPlant" inherit="">
   <construct />
   <scope type="public">
      <func name="GetAge" type="int">
         <body>
            <return>
               <eval object="this" member="Age" />
            </return>
         </body>
      </func>
      <var name="Age" type="int">20</var>
   </scope>
</class>
<node name="MyTree" class="XPlant" />
<xout>MyTree is </xout>
<xout><eval object="MyTree" member="GetAge" /></xout>
<xout> years old</xout>
<deleteclass>XPlant</deleteclass>
<xout>\r\nMyTree is </xout>
<xout><eval object="MyTree" member="GetAge" /></xout>
<xout> years old</xout>

The GetAge method is first called when the XPlant class still exists in class memory. However, the second time it is called, the XPlant class has been deleted, in which case we get an error sent to the output stream. The text in the output stream is:
MyTree is 20 years old
MyTree is
xppRAM/MyTree has no member called GetAge

Example #2 <class name="XPlant" inherit="">
   <construct />
   <scope type="public">
      <func name="GetAge" type="int">
         <body>
            <return>
               <eval object="this" member="Age" />
            </return>
         </body>
      </func>
      <var name="Age" type="int">20</var>
   </scope>
</class>
<node name="MyTree" class="XPlant" />
<xout>MyTree is </xout>
<xout><eval object="MyTree" member="GetAge" /></xout>
<xout> years old</xout>
<deleteclass>XPlant</deleteclass>
<xout>\r\nclass memory is\r\n</xout>
<xout><eval object="classes" /></xout>

This example is the same as the one above. The difference is that after the <deleteclass> statement we write the contents of class memory to the output stream:
MyTree is 20 years old
class memory is
<Classes></Classes>