Source
(defmethod rucksack-delete-object ((rucksack standard-rucksack) object)
(let ((class-name (class-name (class-of object))))
;; Remove object from class index if necessary.
(let ((class-index (rucksack-class-index rucksack (class-of object)
:errorp nil)))
(when class-index
(index-delete class-index (object-id object) object)))
;; Remove object from slot indexes if necessary.
(let ((indexed-slot-names (rucksack-indexed-slots-for-class rucksack
(class-of object))))
(loop for slot-name in indexed-slot-names do
(index-delete (rucksack-slot-index rucksack class-name slot-name)
(slot-value object slot-name)
object
:if-does-not-exist :ignore)))
;; Remove object from roots if necessary.
(when (rucksack-root-p object rucksack)
(delete-rucksack-root object rucksack))))
Source Context