Posted By: Caermundh
so now that ive mastered malloc...how do I UNmalloc? LOL - 07/24/08 01:02
like the title says...how do I unallocate memory in lite-C that has been allocated by malloc()?
Posted By: zazang
Re: so now that ive mastered malloc...how do I UNmalloc? LOL - 07/24/08 02:06
Hmm isnt there a "free" command in liteC or maybe "ptr_remove" will work
Posted By: Joozey
Re: so now that ive mastered malloc...how do I UNmalloc? LOL - 07/24/08 02:08
Yeah free() does the job.
Posted By: Caermundh
Re: so now that ive mastered malloc...how do I UNmalloc? LOL - 07/24/08 02:35
so i if i have something like:
obj_ptr = (object_ref*)malloc(sizeof(object_ref));
I would free up the memory allocated by:
free(obj_ptr);
like so?