From: Jim K. <ji...@ji...> - 2003-10-19 07:22:17
|
Philippe, =20 Yes, that could work. There should only be one reference for each data store. When the object is created, you could pass this reference to a process that (1) opens a new VI reference to the data store, then (2) = polls the original reference until it becomes invalid, then (3) invokes the = object destructor, passing it the new data store reference. =20 Thanks, =20 -Jim =20 -----Original Message----- From: ope...@li... [mailto:ope...@li...] On Behalf = Of PJ M Sent: Saturday, October 18, 2003 5:20 PM To: ope...@li... Subject: Re: [opengoop] automatic call of destructor at garbage = collection time Jim, =20 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. =20 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 _____ =20 Do you Yahoo!? The <http://shopping.yahoo.com/?__yltc=3Ds%3A150000443%2Cd%3A22708228%2Cslk%3= Atext %2Csec%3Amail> New Yahoo! Shopping - with improved product search |