Should I call class destructor in this code?
- by peterg
I am using this sample to decode/encode some data I am retrieving/sending from/to a web server, and I want to use it like this:
BOOL HandleMessage(UINT uMsg,WPARAM wParam,LPARAM lParam,LRESULT* r)
{
if(uMsg == WM_DESTROY)
{
PostQuitMessage(0);
return TRUE;
}
else if(uMsg == WM_CREATE)
{
// Start timer
StartTimer();
return TRUE;
}
else if(uMsg == WM_TIMER)
{
//get data from server
char * test = "test data";
Base64 base64;
char *temp = base64.decode(test);
MessageBox(TEXT(temp), 0, 0);
}
}
The timer is set every 5 minutes.
Should I use delete base64 at the end?
Does delete deallocates everything used by base64?