Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove classes from memory?
Message
From
09/02/2011 03:51:02
 
 
To
09/02/2011 03:40:01
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MySQL
Application:
Desktop
Miscellaneous
Thread ID:
01499307
Message ID:
01499326
Views:
58
You can verify my statement easily

Put in the destroy of the CA class
acti screen
?m.this.Class, 'Destroy()'
return DoDefault()
Then experiment a bit

You'll see the destruction of the objects after having used the DE
Then modify the class, answer yes to "Remove classes from memory?"

If you see any destruction messages after answering yes, it means that there were still objects of that class alive
_____________

>Gregory,
>
>This is a relief then. Thanks.
>
>Dennis
>
>>That is 'normal' behaviour
>>
>>Once the classes have been used, ie instantiated, vfp keeps the (compiled) definition in memory. When you try to edit them, it asks whether it can destroy the definition of the classes in memory
>>
>>It's similar to 'set procedure to something', and then start editing something.prg. You'll see in the status bar: procedure file something.fxp closed ( ie something.prg is no longer in set('procedure')
>>
>>
>>ps: When removing the classes from memory, all objects of that class - if any - get destroyed prior to removing the class' definition from memory
>>
>>pps: when you have instantiated classes that are defined in a prg and you edit the prg, the sequence is
>>- procedure file ... closed
>>- remove classes from memory ?
>>_____
>>
>>>Dear Experts,
>>>
>>>I am testing the CA and DE classes I have made. The DE can have one or more CAs in it. In the command window, all I do is:
>>>
>>>oDE = NEWOBJECT( 'myDE', 'myVCX' )
>>>
>>>Then the CAs get created alright. The cursors show up. Fine. When I want them closed, I do:
>>>
>>>RELEASE oDE
>>>
>>>The cursors get closed, the oDE variable is gone.
>>>
>>>Whenever I go back to modify the CA class, it always shows "Remove classes from memory?"
>>>
>>>Although I just click Remove option and proceed to the Class Designer, what causes this? Dangling references (how could this possibly happen)? Is this something to worry about?
>>>
>>>Thanks
>>>Dennis
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform