From: PJ M <pjm...@ya...> - 2003-10-19 04:22:54
|
Jim, I have and idea, but I am not sure if it qualify as easy though. We could keep a buffer of all opened VI Refs and whenever the spawn process is left with only one reference (The one the spawn process opened) to a given VI, then the VI went Idle. Philippe Jim Kring <ji...@ji...> wrote: 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 ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com _______________________________________________ OpenGToolkit-Developers mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/opengtoolkit-developers --------------------------------- Do you Yahoo!? The New Yahoo! Shopping - with improved product search |