My guess: (I have never succeeded
getting the development environment working so I have not looked at most of the code)
1) there is a polling process that gets fired off after a time (it does not (just) start at startup with no device attached. There are times it does start very close to startup.
2a) I suspect that private variable declaration is being done
inside the loop and until the poll process ends, does not (never) goes to garbage cleanup
2b) There is a log, string (array) variable that gets appended rather than overwritten, continuing to grow each loop