Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1123
  • Last Modified:

visual c++ express watch memory location

I can add variables to the watch window, but as soon as I'm out of scope they turn grey.  I think I have an overrun in my aplication and my memory is getting written to out of scope.  So my question is: is there a way to watch memory locations?  Or at least watch variables when I'm out of scope?
0
esromneb
Asked:
esromneb
1 Solution
 
lakshman_ceCommented:
>>I can add variables to the watch window, but as soon as I'm out of scope they turn grey

This is the default behaviour. Nothing wrong with your application memory. Watch variables would enable those variables with values when the code changes those variables.

Anyway to watch memory
While debugging
Go to Debug->Windows->Memory and specify the address to watch
0
 
AlexFMCommented:
Watching memory location is useless because managed objects can be relocated by Garbage Collector.
Variable which is out of scope cannot be watched because they can be destroyed when go out of scope.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now