Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difference between CREATEOBJECT and NEWOBJECT?
Message
 
 
To
16/11/2000 11:48:19
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00442714
Message ID:
00442798
Views:
10
>Hi,
>
>Simply put: Is there any difference between the methods CREATEOBJECT() and NEWOBJECT() (other than not having to open a corresponding .VCX file before being able to create a reference using CREATEOBJECT)?
>
>And if there are differences, when should I use one or the other?
>
>Thanks a lot in advance, Stephane.

In addition to what Trey said, you get an ever so slight performance hit using NewObject because of what it actually does.

NewObject performs an implict SET CLASSLIB ADDITIVE before it attempts to create the object. However, it is a special additive. It actually prepends the specified class library to the class library path. If the class library already existed in the path, it moves it from where it was in the sequence to the front. After the object is instantiated, NewObject resets the class library path back to what it was.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform