Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Destroy method of biz object is not fired when it's real
Message
From
22/02/2005 11:27:08
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00989209
Message ID:
00989276
Views:
28
yes to both < s>... the object stays in memory but you cannot access it using the original memvar and you probably found a bug in MM.

regarding the first part, while you cannot access the object using the original (now released) memvar, the other thing(s) that hold references to the 'dead' (but not really) object will still work! For what it's worth, in such a case I can see why DESTROY() would not run.
But I am still of the opinion that this is a BAD 'feature' of VFP. When I say RELEASE it should RELEASE the object reference AND the object and let me get a later error when I try to reference the now deceased objct again.

Jim

>So, what are you saying? The the memvar holding the object reference is now released, but the object is still in memory? How can you access this object?
>
>I think, we found a bug in MereMortals. The object should release itself when going out of scope.
>
>>You are making a big assumption here, Nadya.
>>
>>Just because you code a RELEASE does NOT mean that the memvar is actually released!
>>
>>As JayeshP says, *IF* your code puts **ANY** reference to an object's property, or even stores an object reference patial 'path' (for example: xxx = oObject.Treeview) then RELEASE will do nothing to the actual object! Yes, it will release the memvar you specify but it will NOT release the object.
>>
>>good luck
>>Jim
>>
>>
>>>>>>Sorry I don't. I use codebook from Flash. I had similar issue..so...thought would help...
>>>>>
>>>>>No problems. BTW, MereMortals originated from Codebook. Do you have similar problem with Codebook?
>>>>
>>>>I know. That's why I attempt to reply questions posted under MM category. I had the similar problem but as I said, the object was not going out of scope when I did RELEASE.
>>>
>>>
>>>You now confused me. The RELEASE command releases the variable, so it is going out of scope.
>>>
>>>E.g.
>>>
>>>loObject = createobject('MyClass')
>>>release loObject
Previous
Reply
Map
View

Click here to load this message in the networking platform