We are developing an economic sandbox somewhat similar to a mixture of The Guild and Kenshi. Accordingly, in the game, both the player and the NPC will often create and destroy (consume) various objects. But destroy in Unity does nothing with references to destroyed objects, for example, null will simply remain in the List, instead of the destroyed object. The best way that I came up with is, according to the observer pattern, to notify all classes where the object was stored about its destruction and remove references to it from there. But this method does not look optimal; are there better options?
P.S. Sorry for the grammar, English is not my native language.