How do I destroy an instance?
I have an object whose instance is referenced in various parts of my code. At some point I need to delete this object and for this I am doing the following:
meuObjeto = null;
The problem is that this code is only set to null
the variable meuObjeto
. In the rest of the system, the object still exists. How do I update all references in just one point of the code?