allocateInstance
allocateInstance(us_class) =>g_instance
Description
Creates and returns an empty instance of the specified class. All slots of the new instance are unbound.
Arguments
|
Class object or a symbol denoting a class object for which a new instance should be created. |
Value Returned
Exampless
defclass(A () ((slot1 @initform 1) (slot2 @initform 2)))
i = allocateInstance(findClass('A))
i->??
=> (slot1 \*slotUnbound\* slot2 \*slotUnbound\*)
i = allocateInstance('A)
i->??
=> (slot1 \*slotUnbound\* slot2 \*slotUnbound\*)
Related Topics
Return to top