how to figure out if an instance was created on the "stack" or on the "heap"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

a C++ class can be created on the "stack" or on the "heap"

class A {
  int test;
}

// stack
A myA();

// heap
A* myA = new A();


Question:

it is possible (with gcc) to find out if a instance was created on a "stack" or on a "heap" *


mfg




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux