Information générale
Catégorie:
Codage, syntaxe et commandes
Hi,
Isn't it a good practice to release all variables used before the program is terminated?
I have a situation like this:
- A.exe calls B.exe
- A set of public variables are defined in A.exe . They are assigned values from
an INI file. These variables are used in the program to define the location
of data etc.
- A.exe does not release the memory variables.
- B.exe also needs all the public variables defined in A.exe.
Will it be better not to release the public variabled defined by A.exe so that
they need not be redefined in B.exe and use them again in B.exe
or
would it be better to release all variables before terminating A.exe and
redefine all ht public variables and then read
the INI file and assign values to the public variablesin B.exe.
The INI file to be used is passed as a parameter to A.exe & B.exe and
it changes based on where the program is executed.
Ria
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement