08-11-2026 03:26 AM
Hi,
is there an easy way to convert a singleton to cloneable? (a way less important question: why singletons exist at all? Wouldn't it be easier to create everything as cloneable and use one instance if the module is intended to work as a singleton? I guess cloneables probably introduce a bit more of an overhead, but not sure if thats the reason behind)
Thx.
08-11-2026 01:33 PM
As far as I can tell it would still be a manual process of recreating all of the functionality in a cloneable module.
There is extra complexity and overhead involved. But, I think the main decider would be whether the module creator wants the module to be accessed as a singleton or clone. Just like when you're working with a subVI you decide how you want Reentrancy to be handled. (And I think the Reentrancy of Main.vi is being changed for singleton vs. cloneable).
08-11-2026 03:46 PM
Wouldn't it be easier to create everything as cloneable and use one instance if the module is intended to work as a singleton? I guess cloneables probably introduce a bit more of an overhead, but not sure if thats the reason behind)
This was discussed in another question you asked here: https://forums.ni.com/t5/DQMH-Consortium-Toolkits/Are-singleton-modules-justified/m-p/4279937
08-12-2026 01:30 AM
I had the feeling that I may had this question before, but then I said nah... Kudos to you for your well functioning memory-cells 🙂