Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateObject() vs NewObject()
Message
 
To
23/08/2007 19:08:35
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01249678
Message ID:
01250072
Views:
30
>Agreed, but they are part of the language. If much to my constant dismay you have two unrelated objects in a single vcx/prg you cannot release the classlib/procedure because the other class may still be open.

Actually, you can never release a classlib/procedure once it's open, for you do not know if an object still requires it or will require it

>To a degree I suppose. The "isolation" you are talking about IMO is only to have the properties' values and methods isolated from other objects at runtime. In fact, I believe most people open all procedures and vcxs at startup, so that in effect they are also only using the classes.

I agree, but one bad behaving object can cause havoc in the flock, just by closing a library/procedure file or just by forgetting to add one keyword (additive). This of course can be minimized by the use of standards, for example as you say opening all of them at the begining and never closing them, but again, you might get bite by some third party class and finding the culprit might not be as easy
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform