mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 10:21:20 +00:00
is Rich Coe. Also, a minor mod to Makefile.install.am to handle tool names with dashes in. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7112
39 lines
377 B
C++
39 lines
377 B
C++
#include <stdlib.h>
|
|
|
|
class Class1
|
|
{
|
|
public:
|
|
Class1(char *cpointer = NULL) : p(cpointer){};
|
|
~Class1()
|
|
{
|
|
if(p)
|
|
{
|
|
free(p);
|
|
}
|
|
};
|
|
|
|
private:
|
|
char *p;
|
|
};
|
|
|
|
Class1 function1(void)
|
|
{
|
|
Class1 c((char *)malloc(64));
|
|
|
|
return c;
|
|
}
|
|
|
|
void function2(void)
|
|
{
|
|
Class1 c = function1();
|
|
|
|
return;
|
|
}
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
function2();
|
|
|
|
return 0;
|
|
}
|