21 Jun, 2014, MayaRK wrote in the 1st comment:
Votes: 0
char thistory[MAX_CHANNEL_HISTORY][MSL]; is a part of our pc_data struct for saving tell histories.

This is probably not that necessary to know, but in our channel function, it calls these two functions:

memmove(ch->pcdata->thistory[0], ch->pcdata->thistory[1], 9 * MSL);
memcpy(ch->pcdata->thistory[9], tell, MSL);


Since we are working with an array of statically defined size, do I still need to free the contents of thistory in free_pcdata() like I would with a malloc'd char pointer or are the contents destroyed automatically when free_pcdata() is called?

If anyone could give me some tips, that'd be great. Thanks.
21 Jun, 2014, Davion wrote in the 2nd comment:
Votes: 0
MayaRK said:
char thistory[MAX_CHANNEL_HISTORY][MSL]; is a part of our pc_data struct for saving tell histories.

This is probably not that necessary to know, but in our channel function, it calls these two functions:

memmove(ch->pcdata->thistory[0], ch->pcdata->thistory[1], 9 * MSL);
memcpy(ch->pcdata->thistory[9], tell, MSL);


Since we are working with an array of statically defined size, do I still need to free the contents of thistory in free_pcdata() like I would with a malloc'd char pointer or are the contents destroyed automatically when free_pcdata() is called?

If anyone could give me some tips, that'd be great. Thanks.


The way it's defined it's an automatic. You're good to not free it. That memmove/copy thing is likely just pushing old entries off and a new on one. If you'd have called calloc/malloc or an internal memory allocator it'd be a different story.
21 Jun, 2014, MayaRK wrote in the 3rd comment:
Votes: 0
Perfect. Thanks Davion!
0.0/3