I'm fighting with memory managment right now. It's verry funny for me :)
Here is simple app which I wrote. I can allocate memory in two ways.
int main (int argc, const char * argv[])
{
int *x;
int *z;
x = malloc(sizeof(int));
z = (int *)sizeof(int);
free(x);
free(z);
}
Is there any difference between the ways of memory allocating used in the code above ?