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.
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.
This is probably not that necessary to know, but in our channel function, it calls these two functions:
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.