I believe I have a good understanding of what is stored on the stack(for example primitive data types) and what's stored on the heap(for example an instance of a class. But is there anyway to verify this for educational/verification of my expectations reasons?

It can be in a debugger(gdb or rad debugger or worst case vs) or directly code based(thinking something like gettype(variable) but like isstackstored(variable).

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 2 months ago

Very true, and GDB will tell you this.

  • source
  • parent