Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove classes from memory
Message
 
 
To
01/11/2005 22:18:10
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01064331
Message ID:
01065001
Views:
24
Geraldo,

You can have many classes derived from the same class all running at the same time. I routinely have tens of objects all derived from a cObject class inside my app.

When you go into edit a class you may have to unload some of the class definitions from memory because VFP can't edit if some of the inherited classes are currently running.

You code should make sure it's properly cleaning up after itself and disposing objects correctly. You may need an occasional CLEAR ALL while you are working through this issue.

Maybe if you describe the real problem you are having we can offer other suggestions.

>Hi, please to look at this question:
>
>* I think that this problem is a bug or limitation in VFP9.
>* By this example, I can see that one class defined by the user can't be
>* inherited more than one time, because if its occurs the classes are tied
>* in the memory, it is checked when I try to edit the classes after inherited
>* and VFP9 displays the "Remove classes from memory" message.
>*********************************************************************************
>Local lo as Classe1
>lo = NewObject("Classe1")
>lo.newClasse2()
>Release lo
>*********************************************************************************
>Define class Classe1 as Abstract1
>  Procedure newClasse2  as Boolean
>    Local loClasse2 as Classe2
>    loClasse2 = NewObject("Classe2")
>    Release loClasse2
>  EndProc
>EndDefine
>*********************************************************************************
>Define class Classe2 as Abstract1
>  * If this class specify Abstract1 the classes     will be tied in the memory, because Classe1 specify Abstract1
>  * If this class specify Abstract2 the classes will not be tied in the memory, because nobody class specify Abstract2
>  * So my conclusion is that we can't specify a class defined by the user more than one time,
>  * because it make the classes tied in the memory when I specify Classe1 and Classe2 inherited from Abstract1
>EndDefine
>*********************************************************************************
>Define class Abstract1 as Custom
>EndDefine
>*********************************************************************************
>Define class Abstract2 as Custom
>EndDefine
>
>In my application I have problems and I think that thouse problems are because the objects are not cleared from the memory
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform