User Tools

A PCRE internal error occured. This might be caused by a faulty plugin


This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:allocate-instance [2019/11/11 05:00]
cl:functions:allocate-instance [2020/07/10 11:00] (current)
Line 1: Line 1:
 +====== Standard Generic Function ALLOCATE-INSTANCE ======
 +  * **allocate-instance** //class ''&​rest''​ initargs ''&​key''​ ''&​allow-other-keys''//​ → //​new-instance//​
 +====Method Signatures====
 +  * **allocate-instance** (//class// **[[CL:​Types:​standard-class]]**) //''&​rest''​ initargs//
 +  * **allocate-instance** (//class// **[[CL:​Types:​structure-class]]**) //''&​rest''​ initargs//
 +====Arguments and Values====
 +  * //class// - a //​[[CL:​Glossary:​class]]//​.
 +  * //​initargs//​ - a //​[[CL:​Glossary:​list]]//​ of //​[[CL:​Glossary:​keyword/​value pair|keyword/​value pairs]]// (initialization argument //​[[CL:​Glossary:​name|names]]//​ and //​[[CL:​Glossary:​value|values]]//​).
 +  * //​new-instance//​ - an //​[[CL:​Glossary:​object]]//​ whose //​[[CL:​Glossary:​class]]//​ is //class//.
 +The generic function **allocate-instance** creates and returns a new instance of the //class//, without initializing it. When the //class// is a //​[[CL:​Glossary:​standard class]]//, this means that the //​[[CL:​Glossary:​slot|slots]]//​ are //​[[CL:​Glossary:​unbound]]//;​ when the //​[[CL:​Glossary:​class]]//​ is a //​[[CL:​Glossary:​structure class]]//, this means the //​[[CL:​Glossary:​slot|slots]]//'​ //​[[CL:​Glossary:​values]]//​ are unspecified.
 +The caller of **allocate-instance** is expected to have already checked the initialization arguments.
 +The //​[[CL:​Glossary:​generic function]]//​ **allocate-instance** is called by **[[CL:​Functions:​make-instance]]**,​ as described in \secref\ObjectCreationAndInit.
 +====Affected By====
 +====Exceptional Situations====
 +====See Also====
 +  * **[[CL:​Macros:​defclass|Macro DEFCLASS]]**
 +  * **[[CL:​Functions:​make-instance|Generic Function MAKE-INSTANCE]]**
 +  * **[[CL:​Functions:​class-of|Function CLASS-OF]]**
 +  * {\secref\ObjectCreationAndInit}
 +The consequences of adding //​[[CL:​Glossary:​method|methods]]//​ to **allocate-instance** is unspecified. This capability might be added by the //​[[CL:​Glossary:​Metaobject Protocol]]//​.