Does memory get freed at function end?
-
Hello everyone! First of all, thank you all for helping me with my programs and stuff... :) Now, does it? Thanks!
Windows Calculator told me I will die at 28. :(
-
Hello everyone! First of all, thank you all for helping me with my programs and stuff... :) Now, does it? Thanks!
Windows Calculator told me I will die at 28. :(
-
Hello everyone! First of all, thank you all for helping me with my programs and stuff... :) Now, does it? Thanks!
Windows Calculator told me I will die at 28. :(
You don't have to bother about any memory consumed on the stack. But if you dynamically allocate any memory on the heap using malloc/new then you need to explicitly delete using free/delete. Vipin Aravind http://www.explorewindows.com
-
Hello everyone! First of all, thank you all for helping me with my programs and stuff... :) Now, does it? Thanks!
Windows Calculator told me I will die at 28. :(
Kixdemp wrote:
First of all, thank you all for helping me with my programs and stuff... :) Now, does it? Thanks!
depends.. if you create variable in stack it will delete automatically when function exist! e.g. int i ; float j; if you create variable in heap(i.e. using localheap,new,malloc)..it doesn't get delete it self, you have to delete that yourself... or rather you can use auto_ptr
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You