http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
分类: C/C++
2014-05-08 17:30:47
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
示例2
#include
using namespace std;
struct _B;
typedef struct _A {
int i;
dealloc b;
void free_self(struct _A *a)
{
delete a;
}
}A;
int main()
{
cout<<"hello,world"<
for (size_t i=0; i < 100000000; i++)
{
A *a= new A;
a->i = 5;
cout<
a->free_self(a);
}
return 0;
}