I had made a header file with a class named cmysqldb with a lot of pointers. My problem is now this:
How could i create a destructor that will delete the pointers that may cause potential memory leak?
here is the header code:
#ifndef CMSYQLDB_H
#define CMSYQLDB_H
#include <QMultiMap>
#include <QStringList>
#include "mysql.h"
class cmysqldb
{
public:
    cmysqldb::~cmysqldb()
    {
        const char *text,
        MYSQL *connection,
        MYSQL_RES *result,
        MYSQL_RES *fresult,
        MYSQL_FIELD *mfield
    }
    int query_state;
    int numfields;
    MYSQL mysql;
    MYSQL_ROW row;
    MYSQL_ROW fieldrow;
   ....
};
#endif // CMSYQLDB_H
is this what you mean???
 
     
     
     
     
    