Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making the most of Multithreading
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00729042
Message ID:
00730781
Views:
19
>I never have client call release on my servers. But in my destroy events i always make sure i cleanup any object reference i may have in properties and ALWAYS declare vars as Local and alway null objects when i am done with them.
>


... which provides an additional benefit: the earlier you NULL an object reference, the quicker COM+ can drop the activity from one of its thread. Developing components in both VB6 and VFP, I've been learning the hard way about some of the limitations of an STA memory model in COM+.

As a result, I now set the object to NULL as soon as I can in the code, rather than wait for it to leave scope. Luckily, most of my methods are pretty short, but if an object is created and used, then a bunch of unrelated looping code happens before the method exits, why keep the object around, right?
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform