2020-04-24 04:45 AM
2020-04-24 05:12 AM
When you enter a C procedure the local variables are dynamically allocated from the task stack. Exiting the procedure release the stack memory allocated to the objects, since they are no longer needed.
So your answer is: make all objects local in scope to a procedure. Then they will be dynamically allocated.
Jack Peacock