Skip to main content

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

Was this page helpful?