mbeckerle commented on PR #905: URL: https://github.com/apache/daffodil/pull/905#issuecomment-1376347699
I guess the assumption in the SAX API is that the handlers are stateless, or don't require a shutdown/reset call. One would like to not have to define APIs to accomodate statefulness and resources needing to be released, but which just discard objects. It's a garbage collected language after all. But alas, it seems this is not adequate, as GC cleanup does not release resources like threads. My guess is we need to add a reset/cleanup method, and point out that if it isn't called, that the thread will leak. In our own test rig/CLI we need to find a place to call this reset/shutdown. I suspect many applications are not going to care. I suspect they will not create many of these, and their lifetime will be the lifetime of the entire application/JVM. When we do message-streaming it is important for unparse to not construct new handlers (therefore threads) on every call to parse/unparse one message. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
