You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
then the behaviour is not what you expect.
I believe this is because the original Macro TokenizedString is in the cache, and other TS's might be referencing it still, keeping it alive.
You can get the desired behaviour with
this.Macros["SomeMacro"].Set(...)
but you have to remember to do that.
There needs to be an improved mechanism for being able to replace an existing TS.
The text was updated successfully, but these errors were encountered:
For macros, I think the solution is to eliminate the indexer setter.
So you can only ever add a macro through a function, e.g. this.AddMacro(key,value).
But you can get it through the indexer.
If you do the naive thing of
this.Macros["SomeMacro"] = this.CreateTokenizedString(...)
then the behaviour is not what you expect.
I believe this is because the original Macro TokenizedString is in the cache, and other TS's might be referencing it still, keeping it alive.
You can get the desired behaviour with
this.Macros["SomeMacro"].Set(...)
but you have to remember to do that.
There needs to be an improved mechanism for being able to replace an existing TS.
The text was updated successfully, but these errors were encountered: