easy question about free()



Hi,

if I have declared:

typedef struct something_big_struct Something_Big;

struct something_big_struct{
<lots of stuff>
Something_Big *a_big_thing;
};

and I allocate some memory:

SomethingBig *bigPtr;

bigPtr = malloc(sizeof(Something_Big));

After I'm finnished with bigPtr do I need to free a_big_thing separately?
ie do I need to free(bigPtr -> a_big_thing) before I free(bigPtr)?

Thanks for your help

Regards

Michael



.