Closed FalcoGer closed 5 years ago
Thanks for the report, I'll look into it
can you check latest version 1.1.10
?
Should be available on nuget in a few minutes
https://www.nuget.org/packages/KNX.net/1.1.10
thanks for checking that out. I'll get the new version first thing tomorrow.
This is solved
I've been using the example code provided in the form of
where conn is a private field of type KnxConnection
now with Disconnected being:
I've had no troubles for a good while. But at some point the knx ip gateway was disconnected (physically) and not reconnected. and after a while I got a lovely System.OutOfMemoryException. I traced back the problem to Connect(). so I tried (knx detached)
and within a minute or so memory went through the roof, eventually throwing the same exception. I tried calling GC.Collect() after each connection attempt, and then it took 2 minutes instead of one to die. Then I tried calling disconnect before calling GC.Collect(); and then making a brand new connection object. The same problem persists.
Result:
Then I tried to remove the delegates by setting them null before disconnecting and calling GC.Collect(). That didn't help either. So I'm all out of ideas for a workaround.
I'm using this library in a critical application and can't have it crash on me. Please fix your stuff.