Memory leak error fixes. Various compiler fixes.

This commit is contained in:
Jason Turner
2015-01-15 15:42:35 -07:00
parent 759d6fc42f
commit 9449fca22f
7 changed files with 16 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ class TestBaseType
public:
TestBaseType() : val(10), const_val(15) { }
TestBaseType(int) : val(10), const_val(15) {}
TestBaseType(int *) : val(10), const_val(15) {}
TestBaseType(int *i) : val(10), const_val(15) { }
TestBaseType(const TestBaseType &) = default;
virtual ~TestBaseType() {}
virtual int func() { return 0; }
@@ -100,9 +100,11 @@ std::string hello_world()
return "Hello World";
}
int global_i = 1;
int *get_new_int()
{
return new int(1);
return &global_i;
}
// MSVC doesn't like that we are using C++ return types from our C declared module