Object Garbage Collection
If an object is deleted in a cell or a container, its quantity is set to 0, but it is not actually deleted. This must be done at an appropriate time after it was made sure that there are no Ptrs left for the deleted object.
For cells, this might be when they become inactive. The player's inventory is a more complicated case. Object garbage collection could be queued up and executing when OpenMW is running under particular low load.