5.5 Allocation and Finalization
| ((allocator dealloc) alloc) → procedure? |
| dealloc : (any/c . -> . any) |
| alloc : procedure? |
The dealloc procedure itself need not be specifically designated a deallocator (via deallocator). If a deallocator is called explicitly, it need not be the same as dealloc.
| |||
|
The optional get-arg procedure determines which of dealloc’s arguments correspond to the released object; get-arg receives a list of arguments passed to dealloc, so the default car selects the first one.
The releaser procedure is a synonym for deallocator.
| ((retainer release [get-arg]) retain) → procedure? |
| release : (any/c . -> . any) |
| get-arg : (list? . -> . any/c) = car |
| retain : procedure? |
The optional get-arg procedure determines which of retain’s arguments correspond to the retained object; get-arg receives a list of arguments passed to retain, so the default car selects the first one.
The release procedure itself need not be specifically designated a deallocator (via deallocator). If a deallocator is called explicitly, it need not be the same as release.