HandleFromObject - HandleToObject ?

BlitzMax Forums/BlitzMax Programming/HandleFromObject - HandleToObject ?

All that happens when you create a handle is, a reference to the object is stored in a hash table and the key is returned. This means that a reference to that object will exist as long as the table entry remains, so it needs to be removed before the object can be collected. This is where release comes in.

When I *use*/convert the reference back to an object, or perhaps when I plan to delete the entire array?
When you plan to delete the array, or rather, when you no longer need the handle and it's safe for the object to be collected.

Also when I have converted an object to an integer, can I store that integer anywhere I like any number of times and the garbage collector will have no idea about that or need to know that?
Yes, the handle is just a plain old integer. Apart from taking care with handles to null objects, you only have to make sure that it's value, which can be held in *any* integer variable, isn't lost before you release it.