Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewObject() vs AddObject()
Message
 
To
14/02/2008 09:22:11
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01292009
Message ID:
01292684
Views:
32
Hi Tamar,

Thank you for the post. I completely agree with the "depends" part of it <g>

If the help is correct then maybe this has changed in VFP 9? Because it seems to be explained differently in the help, the text Marcia posted and that I am reading right now in VFP 9's help says nothing about closing the libraries, in fact it actually says they use the ADDITIVE clause, and then put it at the beginning of the list, which to me suggest there is indeed a penalty for having the library at the end of the list (seems logical to me), and the corollary is that the longer the list the penalty is higher. Anyways, I do not know anything for certain, is just my speculation for what I read, and also take into account that I mentioned that if you never use SET CLASSLIB/SET PROCEDURE then there would be no need to close/re-open anything for both list (CLASSLIB/PROCEDURE) would be empty.

I completely agree that if you are instantiating several objects in a loop, then setting the class lib/procedure will be faster no matter how NewObject works, but as I said in the old post, I still rather use NewObject unless speed is indeed a problem, it not looks to me cleaner and easier to debug
"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
Reply
Map
View

Click here to load this message in the networking platform