Yes you would - the local property would still be a ref to the global object.
At least if you have property vRef On Fri, 19 Oct 2001 [EMAIL PROTECTED] wrote: > > Me'z got a _little_ doubt... > > Taking Irv's example, suppose I use a local variable instead of a property > variable like this: > > -- Parent script > on new me > vRef = me -- Local variable > return me > end new me > > -- Msg window > gObj = new(script "Parent") > gObj = void > > In a situation like this would I still have vRef floating around as an > orphan object in memory? > > Pranav Negandhi > New Media Applications. > Learnet India Limited, Mumbai. > Phone: 91-22-859 8042 Ext: 410 > > > > <snip> > > Case 2) Lets say you have a parent script like this, in the new > > handler, you to store a copy of "me" into a property variable "pMe" - > > as Kerry originally suggested earler before recanting :) > > > > -- someParentScript: > > > > property pMe > > > > on new me > > pMe = me -- this sets the "ref count" to 1 > > return me > > end > > > > And you create it with the following line > > > > someObjectReference = new(script "someParentScript") -- this sets > > the "ref count" to 2 > > > > > > Then later, as you say, you destroy the object like this: > > > > someObjectReference = VOID -- in an attempt to the object > > > > But ... the object isn't destroyed because pMe still holds a > > reference to the object. The ref count just goes from 2 down to 1. > > > > Now, unfortunately, you have an "orphaned" object. There is this > > object lying around taking up memory, but you cannot get to it > > because there while there still is an object reference - there is no > > way you can get to it.<snip> > > > > [To remove yourself from this list, or to change to digest mode, go to > http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, > email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) > Lingo-L is for learning and helping with programming Lingo. Thanks!] > [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
