On 31 May 2011, at 20:00, [email protected] wrote:
> From: Alfred Van Hoek <[email protected]> > Subject: Re: How to unlock an instance of a custom class in RBScript I actually don't know what you are trying to do. Maybe I don't need to know? I know that in a plugin you can keep a pointer to an object and not lock it. Or do clever stuff with refcounting. My "RingTree" plugin class implements a parent/child relationship in a tree, without cyclical reference problem. It "just works" as expected. But to do this, I had to do things that are not supposed to be done, such as checking if the refcount = 1 before unlocking or this kind of thing. Are you creating and calling the RBScript from within your plugin? If you can pass each newly created object to the plugin, the plugin can keep it's own list. And also in the class's destructor, it can tell the plugin to remove it from the list. You don't even need to get an integer in RB, just pass the object normally. Also, did you look at the weakref class? -- http://elfdata.com/plugin/ "String processing, done right" _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
