memory 2004-10-08 - By Olcerin Aristiis
Back I am not an advanced enough C coder to have just started tinkering with this without alot of study, so I am posing it as a question instead.
The difference as I understand it, in str_dup and STRALLOC is that STRALLOC adds it to a hash table.
Before I go into manical study to learn the mysteries of the hash table, would it be possible to code a single free function that detects whether it's on this table or not (or in other words, are we freeing a string that was allocated by str_dup or STRALLOC), and then frees memory accordingly?
Yes, it would seem rather unnecessary, but judging from the knowledgable, great coders in the past that have shared their SMAUG code, and even the codebase itself, who mistakenly intermingled between the two, it would seem that a single function like that would really be a nice safety net.
I just wondered if one of you more adumacated could answer this before I spend alot of effort studying up on it just to find out it was a silly notion for some reason.
Thanks.
===== "All paid jobs absorb and degrade the mind." Aristotle
__ ____ ____ ____ ____ ____ ______ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
|
|