Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-11-2020, 03:17 AM   #1
Human being with feelings
SaschArt's Avatar
Join Date: Aug 2013
Posts: 226
Default Static variables in functions are safe?

Is it safe to work with static variables in functions? For example, if I use this variable in the OnParamChange function
void VSTCLASS::OnParamChange(int id) {
	IMutexLock lock(this);
	static float last_val;
If the user loads multiple instances of my plugin on the same Host, is there a risk that the variable will become global for all these instances? Since I use the same name for the class and the same variable name?
Audio plugins | BrainWaveProducer | EmRysRa
SaschArt is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 01:58 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.