{
public:
TcpServer();
+ ~TcpServer();
bool open();
bool process();
bool close();
channel = new SGSocket( "", "5500", "tcp" );
}
+TcpServer::~Tcpserver()
+{
+ delete channel;
+}
+
bool
TcpServer::open()
{
ibuffer = (unsigned char *) malloc(win_width*win_height*RGB3);
if ( (fp = fopen(filename, "wb")) == NULL ) {
+ free(ibuffer);
printf("Warning: cannot open %s\n", filename);
return false;
}
SGTime::~SGTime()
{
- if ( tzContainer != NULL ) {
- SGTimeZoneContainer *tmp = tzContainer;
- tzContainer = NULL;
- delete tmp;
- }
+ delete tzContainer;
}