class A
{
public:
A():a(0), b(0){}
handleMyMsg( char* aa, char*bb);
private:
processMessage();
processMessage2();
char* a;
char*b;
}
Object of type A is created once and handleMyMsg is called several
times with different values for the arguments. processMessage and
processMessage2 are helper functions which needs to work on the
arguments passed to handleMyMsg.
Is it a bad idea to have member variables a and b which are
initialized witht he values of aa and bb every time handleMyMsg is
called?
In other words, is it a bad idea to have member variables which do not
have the same lifetime as the object which owns it?