刚才看到一个帖子。很confused所以拿来向高手请教。
如在dll中有
void __declspec( dllexport ) int* Fun(int size)
{
return (int *) malloc(size)
}在app中调用如下
int * p=Fun(1024);
//问题是什么时候释放指针。在dll中还是在app中?
如在dll中有
void __declspec( dllexport ) int* Fun(int size)
{
return (int *) malloc(size)
}在app中调用如下
int * p=Fun(1024);
//问题是什么时候释放指针。在dll中还是在app中?
这是M$的OS调用DLL的机制,其他平台不存在这个问题