On Mon, Dec 15, 2008 at 06:34:10PM +0200, Graham Leggett <[email protected]> 
wrote:
> Can someone confirm first of all for me that ev_timer_stop is the  
> correct way to cancel a timer?

Yes - are you sure you don't start it again, or modify it in illegal ways?

> The docs make no mention of how you destroy a timer, only how you might  
> create one or reset one.

Because destruction is on your side of the API - libev has no facilities
to create or destroy timers, that's what the application does.

The documentation mentions exactly, however, when you can safely reuse the
watcher structure for something else, which is what you seem to want.

But remember, creation and destruction _for watchers_ is completely
outside the libev API, only _event loops_ can be created and destructed.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to