From: Jim K. <ji...@ji...> - 2003-10-18 21:08:35
|
I am trying to think of a way (preferably simple) to have the destructor automatically called when object garbage collection occurs. OpenGOOP = object data-stores are reentrant LV2 globals which are called by reference. In fact the object reference is a VI Reference. When the call chain that instantiated the object goes idle, the data store VI is garbage = collected by LabVIEW. It would be nice to be able to intercept this and run the destructor method of the object, automatically. This would make = debugging a lot easier In order to do this we would need to spawn a process that = opens a reference to the object LV2 global, so that it does not get garbage collected. Then we would need to poll the execution state of the = top-level VI in the call chain that instantiated the object. When this top-level = VI goes idle we would then invoke the destructor. What would make this = much easier, is if the event structure had a VI Event called "Going Idle" or similar. Any thoughts? -Jim |