|
Hi.
I have a utility that is successfully triggered by a NodeEventCallback. I want to be able to toggle this utility on/off - but can find no description of how to remove a NodeEventCallback. The remove syntax for regular callbacks doesn’t seem to work and I have to use the NodeEventCallback as my utility is related to a sub-object selection change.
any help much appreciated!
Ollie.
|
|
|
|
So in the end I got the answer from a contact who is part of the AutoDesk developer network. For the benefit of anyone else who is encountering this, here’s the explanation:
When you call NodeEventCallback, you are creating an instance of the class.
myInstance = NodeEventCallback(—arguments here );
To release this, we need to delete the class.
myInstance = undefined;—remove handle to class
gc() —force memory reclamation to actually delete anything
The guys at ADN agreed this was unintuitive and promised to add it to the help documentation.
Octoboy.
|
|
|
|
Thanks for solving this, there was a similar thread at cgsociety, http://forums.cgsociety.org/showthread.php?f=98&t=725434
-R
|
|
|