Quote:
Originally Posted by killerogue
Well, to be honest I didn't know you could even return objects?
|
A TGraalVar that is an "Object" exists as a reference to the object so no matter where the variable is it will always point to a specific object. And yes, you can return object
references.
It is something I used in my mud system, you construct all mud objects in a single array and return the object reference with the function. Having a master list prevents the object from being destroyed because of lack of references. Though I don't know what Graal does when all references are removed, I expect it similar to Java.