I have a class named test wihich looks like this:
class test
{
public:
//Constructor for class test
test()
{
FrmAlert(CONSTRUCTOR); // Displays message constructing
};
//Destructor for class test
~test()
{
FrmAlert(DESTRUCTOR); // Displays message de-constructing
};
};
I am creating an instance of my class test in menu event of
MainFormHandleEvent like this:
case menuEvent:
test a;
handled = true;
break;
But the alert DESTRUCTOR is being displayed even if i donot do any
thing with menu.
Why should a destructor be called even before my class in instantiated?
Even if we suppose that class is being instantiated, why should
destructor be called first?
It should be constructor which is called first!!
I am using Codewarrior rel 6 with palm os 3.1
Where is the problem ?
Thanks in advance
--
Anne Srinivas
Software Engineer
InfoTech Enterprises Ltd.
Plot No 11,Infocity,
Software Units Layout,
Madhapur,Hyderabad 33
E-Mail :
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel (Office) : 3100855
Tel (Resi) : 3033761
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/