I hope to check the allocated memory for one pointer with QT, but which function can we use?
like this:
Code:
ClassA *a = new ClassA(); int size = sizeof(a)
Printable View
I hope to check the allocated memory for one pointer with QT, but which function can we use?
like this:
Code:
ClassA *a = new ClassA(); int size = sizeof(a)
Hi,
Code:
int size = sizeof(*a);
is your friend and normal C++.
Lykurg
There's also QT_POINTER_SIZE.
Size of pointer is usually word size. They just hold addresses, remember ?
The size of class is size of object. sizeof(*a), in ur case