Hello,
On Fri, 01 Jan 2010 13:12:59 +0100 (CET) Jan Mura <jan...@vo...>
wrote:
> I would like to store an address of a pointer I'm going to freed.
> So I made something like
> user_type o...*i, *j;
> j = i;
> free (i); X
> ...
>
> I would like to ask if after the free command
> does j points to the same address like before. It should be so, I
> think.
> I need the address because it points to the next member in a
> connected list.
free(pointer) does not change pointer's value, however you cannot use
it (nor other pointers pointing at the same location) because it was
freed. Pointer arithmetic, if results to valid address, should work.
|