event_free

March 26, 2020 Contributors

Name

event_free — Free an event

Synopsis

#include "event.h"

| void **event_free** ( | e); |   |

Event * <var class="pdparam">e</var>;

Description

Free an event.

#include "ec_config.h"
#include "event.h"
#include "scheduler.h"

static int my_func(Event *event, int eventtype, void *closure,
  struct timeval *now);
...

  Event *t = build_event_from_now_f(30, -1, my_func, "hello");
  schedule_event(t);
...
  if (!clear_timed_event(t)) {
    event_free(t);
  }
  /* t is no longer valid */
...

Parameters

dst

The Event.

Return Values

This function returns void.

Threading

Warning

Only call this function from the Scheduler thread.

See Also

“Event” and build_event_from_now_f