ryah dahl wrote:
libev is a performance-oriented library; since allocations can be a bottleneck and can be handled in many different ways, the library uses a common pattern and gives memory control to the user. Perhaps the user wants to allocate only a fixed number of watchers statically, perhaps they use a memory pool, or perhaps they just use malloc - all of these use cases are supported by ev_*_init.The mistake checking you want could be added with very much overhead (keeping a list of all the pointers initialized, and adding a ev_*_deinit function? putting a checksum in the structure?), but that would negate the point of giving user memory control in the first place. Also, no one needs it because it's clear from the outset that managing watcher memory is the user's job.
I am not following what memory allocation has to do with this problem?The problem that I am seeing is that if the same timer is initialised twice, an attempt to stop the timer does not cause the timer to stop.
In theory, it shouldn't matter how many times you init the timer, a stop should stop it.
Regards, Graham --
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
