How do I create and read non-global variables that aren't destroyed at end of function?
Posted
by
Paul Reilly
on Stack Overflow
See other posts from Stack Overflow
or by Paul Reilly
Published on 2011-01-06T03:44:12Z
Indexed on
2011/01/06
3:53 UTC
Read the original article
Hit count: 191
I am attempting to code some plugins to use with MIDI sequencers but have hit a stumbling block. I can't use global-scope variables to store information because multiple instances of the .dll can exist which share memory.
How do I create a class (for re-usability purposes in other plugins) containing 2 dimensional array and other variables the content of which is to be shared between functions? If that is possible, how would I read and write the data from the function in the framework where I do the processing?
© Stack Overflow or respective owner