Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best practice: to clear or not to clear DLLs
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00781835
Message ID:
00781984
Vues:
20
>>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?
>>
>>Thanks
>
>Terry,
>
>My friend David Frankenbach pointed out that there is a miniscule amount of overhead in not using CLEAR DLLS. However, I should mention that this point was made prior to 7.0, which allows you release specific DLLS.
>
>In this case, I fall back on what I call "Mom's Rule". "Put things back the way you found them." These days I tend to declare and release DLLs in the same method.

That's my feeling too. The circumstance is kind of outlined in thread #781920. Being mostly a mindless user of APIs, I initially thought I would have to declare (and release) 6 or 7 APIs to modify a previously defined "BAR" on the fly. I recently (think i) learned one function, as long as pointers and handles are stashed away, will be enough. I am going to test leaving the "one" declaration open vs closing the DLL and reissuing the declaration as needed.

Thanks
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform