Re: [CODE] Ferry code

From: Brian (borlick@mines.edu)
Date: 11/06/02


Greetings,

Thomas Arp wrote:
> From: "Brian" <borlick@MINES.EDU>
> >   static struct obj_data *tobj;
> >
> > there's still the problem that the object may get purged
> > before the ferry routine is run.  In that case, tobj points to memory
> > which may longer be valid.  That is, you may get random crashes from that
> > code.
>
> Nope. Have a look at mag_creations(). That's actually the exact way it is
> supposed to be.

The *creation* is exactly how it's supposed to be, but the destruction
would not be.  I'm not sure you understood my point.  I was saying that
if the object was destroyed prior to the special proc being run again,
say, by a zone reset, or a god typing 'purge', the object pointer would
no longer be valid. As such, a later attempt to free it (via
extract_obj()) might result in a crash.

-Brian

--
   +---------------------------------------------------------------+
   | 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