Should I call class destructor in this code?
Posted
by peterg
on Stack Overflow
See other posts from Stack Overflow
or by peterg
Published on 2010-05-24T19:05:06Z
Indexed on
2010/05/24
19:11 UTC
Read the original article
Hit count: 263
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?
© Stack Overflow or respective owner