[AGENT++] Thread handle leak (SNMP++ 3.2.21a)

Jochen Katz katz at agentpp.com
Sun Jan 21 22:20:39 CET 2007


Hi,

> It turned out that the same piece of code causes a memory leak under
> Linux too. The reason is that taskDelete() is not called (in
> stop_poll_thread()) for the thread created by taskSpawn() (in
> start_poll_thread()).
> 
> Here's some info on taskSpawn/Delete -
> http://www.slac.stanford.edu/exp/glast/flight/docs/VxWorks/docs/vxworks/ref/taskLib.html#taskDelete

within stop_poll_thread() m_bThreadRunning flag is set to false, and the
poll thread will stop itself. Is it then legal and a "must do" to call
taskDelete() for the already finished thread? The taskSpawn() doc does
not state that taskDelete() has to be called in any case.

Regards,
  Jochen





More information about the AGENTPP mailing list