minor fixes for valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7695 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c974cc8ed8
commit
c971122743
4 changed files with 11 additions and 3 deletions
|
|
@ -15,12 +15,17 @@ extern "C" void* working(void* t);
|
|||
class Foo {
|
||||
public:
|
||||
int val;
|
||||
Foo() : val(0) {}
|
||||
pthread_t *t;
|
||||
|
||||
virtual ~Foo() {}
|
||||
Foo() : val(0) {
|
||||
t = new pthread_t;
|
||||
}
|
||||
|
||||
virtual ~Foo() {
|
||||
delete t;
|
||||
}
|
||||
|
||||
void run() {
|
||||
pthread_t *t = new pthread_t;
|
||||
pthread_create(t,NULL,working,this);
|
||||
sleep(5);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue