All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 2 Objective-C Reference

objc-object-destroyed Generic Function

Summary

Called when an Objective-C is destroyed.

Package

objc

Signature

objc-object-destroyed object

Method signatures

objc-object-destroyed (object standard-objc-object)

Arguments
object
An object of type standard-objc-object.
Description

When an Objective-C foreign object is destroyed (when the reference count becomes zero) and its class was defined by define-objc-class, the runtime system calls the generic function objc-object-destroyed with object being the associated object of type standard-objc-object to allow cleanups to be done.

The built-in primary method specializing object on standard-objc-object does nothing, but typically :after methods are defined to handle class-specific cleanups. This function should not be called directly.

Defining a method for objc-object-destroyed is similar to implementing "dealloc" in Objective-C code.

See also

release
standard-objc-object


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 01 Dec 2021 19:38:32