I use the current snmp library version 8.5 but had the same problem in previous version 8.0 too.
If I call the extension method BeginGetResponse() (implemented in SnmpMessageExtension.cs) and my SNMP device is not running, there is every time a SocketException. The exception is thrown in the function BeginGetResponse() at the line "var ar = udpSocket.BeginReceive(....)".
My memory profiler shows two leaks: one in Lextm.SharpSnmpLib.Security.UserRegistry (132 Bytes) and two in Lextm.SharpSnmpLib.Messaging.SnmpMessageExt (84 and 132 Bytes).
My Application polls the SNMP devices all 2 seconds, so after 48 hours I got an OutOfMemory exception.
Please help, what could be wrong?
Comments: I added two test cases, but could not locate obvious leak from #SNMP side. Thus, hope you can do more profiling on your side, https://github.com/lextm/sharpsnmplib/commit/914a74ab6041d5b8198b60325ddf4da9c0853c88
If I call the extension method BeginGetResponse() (implemented in SnmpMessageExtension.cs) and my SNMP device is not running, there is every time a SocketException. The exception is thrown in the function BeginGetResponse() at the line "var ar = udpSocket.BeginReceive(....)".
My memory profiler shows two leaks: one in Lextm.SharpSnmpLib.Security.UserRegistry (132 Bytes) and two in Lextm.SharpSnmpLib.Messaging.SnmpMessageExt (84 and 132 Bytes).
My Application polls the SNMP devices all 2 seconds, so after 48 hours I got an OutOfMemory exception.
Please help, what could be wrong?
Comments: I added two test cases, but could not locate obvious leak from #SNMP side. Thus, hope you can do more profiling on your side, https://github.com/lextm/sharpsnmplib/commit/914a74ab6041d5b8198b60325ddf4da9c0853c88