In a dev environment (but certainly not in production), the register-sighup-handler defn is largely unnecessary. Because of that, the global tk-apps atom also becomes unnecesary, particularly if one has a different means of accessing a global app object (which is very usual under a Reloaded workflow).
By accumulating apps in this atom, one creates hard memory references that can plausibly create a memory leak.
Use Case
In a dev environment (but certainly not in production), the register-sighup-handler defn is largely unnecessary. Because of that, the global
tk-apps
atom also becomes unnecesary, particularly if one has a different means of accessing a global app object (which is very usual under a Reloaded workflow).By accumulating apps in this atom, one creates hard memory references that can plausibly create a memory leak.
Describe the Solution You Would Like
Inrtroduce a java system property which elides this call: https://github.com/puppetlabs/trapperkeeper/blob/c943510c08acde6b1e3c2b55b450fef325734022/src/puppetlabs/trapperkeeper/core.clj#L158
Said property would typically enabled only in dev envs.
Describe Alternatives You've Considered
One could keep the functionality but changing it to use
WeakReference
s instead. Seems a needless source of complexity though.