Re: Question re: freeing structs [NEWBIE]

From: Torgny Bjers (
Date: 10/14/02

From: "Mathew Earle Reuther" <graymere@ZIPCON.NET>
> I'm adding something in to my mud which I've decided to store as a
> structure, similar to how extradescs are stored.  Unlike extradescs, there
> are no strings, only numbers which are stored.  As a result, when I
> rewrite the free_extra_descriptions, it gives me an error regarding
> integers, pointers, and casts for each line I attempt to free an integer.
> If I remove those, it no longer complains.  It is my understandng from
> this that simply by freeing the structure itself, the integers are freed?

If you only have numbers stored, id est, not strings, then you need not free
them individually, and it's enough just freeing the struct.  The only time
you need to free things inside the struct is if you have strings stored in


   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT