Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Difference between CREATEOBJECT and NEWOBJECT?
Message
 
 
À
16/11/2000 11:48:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00442714
Message ID:
00442798
Vues:
7
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform