This is a discussion on Best Alternative within the C and C++ forums, part of the Programming Talk category; Can someone suggest the best possible way to release of all resources once a program is completed or also after ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Best Alternative
Can someone suggest the best possible way to release of all resources once a program is completed or also after forcing a program for termination? I want to know the best alternative for achieving this and also kindly state the reason why it is best
|
|
|||
|
the best possible way to release of all resources depends upon the programmer how he/she writes the code.
the best possible way is to make a funcion for the same purpose and make a call to free() function for any resources allocated by every pointer used in the program and as for as the other variables are concerned; all of them are destroyed by the OS itself once the program is finished. |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best Alternative | cyrus | C and C++ | 1 | 05-11-2007 04:38 PM |
| Solaris x86 FAQ 2/2 | Dan Anderson | Tech FAQ | 0 | 04-27-2004 08:24 PM |