Original Post
I''m using a vector to store and maintain a number of instances of one object.
msClientConnectionTCP *client; typedef vectorclient is obviously a pointer to a class. so I''m derefencing the pointer when I call push_back. However, for some reason the destructor msClientConnectionTCP::~msClientConnectionTCP is being called by push_back and deleting this instance of the class. Is this normal, or am I doing something fundamentally wrong here? I thought I was on the right track with this. Any help greatly appreciated. ThanksclientGroup; client = acceptSocket->accept(); if (client != NULL) { printf("Connection established\n"); clientConnections.push_back(*client);