actually I'm building a shared library in which I wanted to use "myfree" function and I'm calling it for a different number of, as you said, sizes/representations so I think I'll follow your...
Type: Posts; User: abd
actually I'm building a shared library in which I wanted to use "myfree" function and I'm calling it for a different number of, as you said, sizes/representations so I think I'll follow your...
This is how I get it working:
#include<stdio.h>
#include<stdlib.h>
typedef struct S1{
int a;
char b;
}S1;
void myfree(void** freeptr)
PS: Also it's was a really subtle error because I was able to free the pointer successfully but not change it's address to NUL.....
I see.... I thought I was already "passing by reference" by just passing a pointer but indeed I need to pass a reference to the pointer in self...
So I think basically passing a pointer as...
Hi I have a "myfree" function which frees my pointer allocated memory space, but after freeing my pointers and make them NULL, when the functions returns to main the pointer address (although already...