Skip to content

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

@vemv

Description

@vemv

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions