Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

delete error using >=g++4.7.2 #7

Open
xunzhang opened this issue May 26, 2014 · 1 comment
Open

delete error using >=g++4.7.2 #7

xunzhang opened this issue May 26, 2014 · 1 comment

Comments

@xunzhang
Copy link
Contributor

#include <vector>
#include <string>
#include "client.h"

int main(int argc, char *argv[])
{
  Beanstalkpp::Client *pt = new Beanstalkpp::Client("beater7", 11300);
  pt->connect();
  delete pt;
  return 0; 
}

I compile the code above using 'g++-4.7.2' and get a 'Segmentation fault'. But when I use g++-4.5, the problem is gone.

What's the problem here?

@blindmatrix
Copy link
Contributor

What compiler options did you use?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants