components/prboom/p_tick.c
//
// P_RemoveThinker
//
// Deallocation is lazy -- it will not actually be freed
// until its thinking turn comes up.
//
// killough 4/25/98:
//
// Instead of marking the function with -1 value cast to a function pointer,
// set the function to P_RemoveThinkerDelayed(), so that later, it will be
// removed automatically as part of the thinker process.
//
P_RemoveThinker
Deallocation is lazy -- it will not actually be freed
until its thinking turn comes up.



Instead of marking the function with -1 value cast to a function pointer,
set the function to P_RemoveThinkerDelayed(), so that later, it will be
removed automatically as part of the thinker process.
P_RemoveThinker Deallocation is lazy -- it will not actually be freed until its thinking turn comes up . Instead of marking the function with - 1 value cast to a function pointer set the function to P_RemoveThinkerDelayed () so that later it will be removed automatically as part of the thinker process .
void P_RemoveThinker(thinker_t *thinker)
{
  R_StopInterpolationIfNeeded(thinker);
  thinker->function = P_RemoveThinkerDelayed;
  P_UpdateThinker(thinker);
}
void P_RemoveThinker ( thinker_t * thinker ) { R_StopInterpolationIfNeeded ( thinker ) ; thinker -> function = P_RemoveThinkerDelayed ; P_UpdateThinker ( thinker ) ; }
P_RemoveThinker
Deallocation is lazy -- it will not actually be freed
until its thinking turn comes up.
P_RemoveThinker Deallocation is lazy -- it will not actually be freed until its thinking turn comes up .