T
Tim Murray
Hello,
I am developing a console application in Managed C++
with Visual Studio .Net. I am trying to learn how to
correctly destroy variables. When I run my program, with
every added action, the memory usage increases but the
only memory being allocated in each function is for
temporary local variables, and should not persist.
Calling the garbage collector does not seem to do anything
to clean up the memory usage. I am currently setting each
variable back to NULL upon leaving the functions, but it
does not seem to be working. Are variables in Managed C++
not cleaned up when they go out of scope? Am I supposed
to take extra precautions to get them to be released? Is
there any way for me to find out what is leaking?
Thank you for your help,
Tim
I am developing a console application in Managed C++
with Visual Studio .Net. I am trying to learn how to
correctly destroy variables. When I run my program, with
every added action, the memory usage increases but the
only memory being allocated in each function is for
temporary local variables, and should not persist.
Calling the garbage collector does not seem to do anything
to clean up the memory usage. I am currently setting each
variable back to NULL upon leaving the functions, but it
does not seem to be working. Are variables in Managed C++
not cleaned up when they go out of scope? Am I supposed
to take extra precautions to get them to be released? Is
there any way for me to find out what is leaking?
Thank you for your help,
Tim