Custom data type with a time watcher and memory control at process exit.

vvvua vvvua at
Thu Oct 7 12:42:12 CEST 2010

I'm trying to handle with possible memory leaks in my project and have 
some trouble with exit before timer's callback function starts. I'm 
using Linux debian/g++.
So, if I have started 3 timers with custom data and allocation as

     TimeSockMapper *mtm = new TimeSockMapper();
     mtm->repeat = 0;

     ev_timer_init (&(mtm-> tm), heartbeat_cb, 0.001, 0.001);
     ev_timer_start(timeloop, &(mtm->tm));

where "TimeSockMapper" is my custom data block:

struct TimeSockMapper
     struct ev_timer tm;
     ev_tstamp repeat;
     ClientID fd;
     void *defPoint;
         defPoint = NULL;

How can I rise all watchers on a defined "timeloop" to free a memory ?


More information about the libev mailing list