/
html/
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from ProgrammersManual.texinfo on 4 March 1997 -->

<TITLE>LambdaMOO Programmer's Manual - Creating and Recycling</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_73.html">previous</A>, <A HREF="ProgrammersManual_75.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>.
<P><HR><P>


<H3><A NAME="SEC74" HREF="ProgrammersManual_toc.html#TOC74">Creating and Recycling Objects</A></H3>

<P>
Whenever the <CODE>create()</CODE> function is used to create a new object, that
object's <CODE>initialize</CODE> verb, if any, is called with no arguments.  The call
is simply skipped if no such verb is defined on the object.

</P>
<P>
Symmetrically, just before the <CODE>recycle()</CODE> function actually destroys an
object, the object's <CODE>recycle</CODE> verb, if any, is called with no arguments.
Again, the call is simply skipped if no such verb is defined on the object.

</P>
<P>
Both <CODE>create()</CODE> and <CODE>recycle()</CODE> check for the existence of an
<CODE>ownership_quota</CODE> property on the owner of the newly-created or -destroyed
object.  If such a property exists and its value is an integer, then it is
treated as a <STRONG>quota</STRONG> on object ownership.  Otherwise, the following two
paragraphs do not apply.

</P>
<P>
The <CODE>create()</CODE> function checks whether or not the quota is positive; if
so, it is reduced by one and stored back into the <CODE>ownership_quota</CODE>
property on the owner.  If the quota is zero or negative, the quota is
considered to be exhausted and <CODE>create()</CODE> raises <CODE>E_QUOTA</CODE>.

</P>
<P>
The <CODE>recycle()</CODE> function increases the quota by one and stores it back
into the <CODE>ownership_quota</CODE> property on the owner.

</P>
<P><HR><P>
Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_73.html">previous</A>, <A HREF="ProgrammersManual_75.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>.
</BODY>
</HTML>