I am using CW4.
Here is a snippit of code
class A{
public:
A() {}
virtual ~A() {}
};
This is generating some global data. What is curious is even if the
class is not instantiated (sp) I am using 12 bytes of global data. Each
extra virtual function adds another 4 bytes. Now this is not usually a
problem, but I want to put this code in a shared library on the Palm,
and I am not allowed any global data.
My question is 2 fold
1) Why is this generating global data? It seems the virstual function
table would have to be stored with the instance of the object, since the
type of object won't be known until run time.
2) Is there anyway around this, other than abandoning virtual
functions. This is not too bad in my case, but it would obscure a
rather easy to understand piece of code.
If anyone could shed some light on this and educate me, I would most
appreciate it.
Oliver
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html