the best part being that the object is surely gone, the this.myFloat still gets printed AND increased, and I don’t have any persistent listener.
If I remove in Destroy then all goes fine. It seems the AddListener is creating a link to the object in memory and even triggering the GC will not collect the object. Using a weak reference would probably bring it back to life I am thinking.
What is even better is that if I create a reference to my script above and call for the myFloat value, I get it!!! Despite the inspector showing Missing(Type)!!!..
This tells me that we have here a memory leak if the programmer is not removing the listener manually, until I am proven wrong. obviously.