Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best practice: to clear or not to clear DLLs
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00781835
Message ID:
00830582
Views:
19
>Hi Terry,
>
>>Is it a bad practice to leave a Windows API declaration open (eg, no CLEAR DLL) through the life of a session. From time to time, the APP will need to re-issue the function. Should it be CLEARed after being issued, and then re-declared. Or - can I just leave the reference open?
>
>I never clear DLL definitions. There's certainly an overhead involved in having too many declarations in memory as they have to be searched sequentially. OTOH, declaring a DLL function is even more of an overhead because a physical file access finds place. In case of using WIN32API, VFP actually searches multiple DLLs for the function.
>
>--
>Christof

How about having the DECLARE statement in the routine that needs it and not using CLEAR DLLS? In that case, the DECLARE statement is done each time that the routine is accessed. Is VFP intelligent enough to realize that the declaration was already made and that a physical file access is not needed?

The alternative is to declare the dll in the init of the application, instead of in the routine(s) that actually need it.

Is the alternative better?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform