Page 1 of 1
Do I need to manually release all resources?

Posted:
Nov 6, 2006 @ 4:30pm
by Nomad
Do I need to manually release all resources at the end of the program by calling apropriate free() method of every object?
Or this is done automatically?

Posted:
Nov 6, 2006 @ 6:36pm
by Matias
Nomad,
It is not necessary to call the apropiate free method when you program finishes. It's a good practice but the truth is that when the process ends, all the memory allocated for that process it`s liberated.
You don`t have to concern about this memory usage because the SO handles it. But, ONLY IF YOUR PROGRAM ENDS, if not, this memory will not be free until you call the method.
I hope it`s usefull
Best Regards

Posted:
Nov 6, 2006 @ 10:35pm
by Nomad
Hi, Matias!
Yes, it was helpful.
And I want to know some more on this topic.
Is that actions that do free() method, done in every object's destructor or not?

Posted:
Nov 6, 2006 @ 11:05pm
by Sergio