Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable the accumulation of tk-apps in a global atom #291

Open
vemv opened this issue Jan 21, 2021 · 0 comments
Open

Add option to disable the accumulation of tk-apps in a global atom #291

vemv opened this issue Jan 21, 2021 · 0 comments

Comments

@vemv
Copy link

vemv commented Jan 21, 2021

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:

(swap! internal/tk-apps conj app)

Said property would typically enabled only in dev envs.

Describe Alternatives You've Considered

One could keep the functionality but changing it to use WeakReferences instead. Seems a needless source of complexity though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant