Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best Practices
Message
From
09/02/2013 09:30:12
 
 
To
08/02/2013 10:01:38
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01565478
Message ID:
01565612
Views:
156
>It isn't. If you instantiate the class with newobject or with SET CLASSLIB TO, you'll allocate memory either way. What I failed to clarify is that if you instantiate the class everytime you needed, there is overhead involved vs. doing it only once.

It's not a memory issue, it's a performance issue. NEWOBJECT() is slower because it has to find the specified library, open it (doing all the necessary parsing), instantiate the class, and close the class library. With SET CLASSLIB TO, you skip all but the instantiating task when you CREATEOBJECT().

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform