Re: Question re: freeing structs [NEWBIE]

From: Torgny Bjers (artovil@arcanerealms.org)
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
them.

Regards,
Torgny

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



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