Unwanted phase flipping in stereo

I made a simple 2 channel delayline.
When i run the vst file from the release build, one of the channels get flipped in polarity. When i use the vst file from the debug build it doesnt do that, then everything works as expected. Why does this happen?

An uninitialized variable somewhere, perhaps? Debug builds set variables to zero while release builds don’t. If your code is assuming a variable is set to zero somewhere, it might not be in release mode (but some random value).

I cleaned the solution and then built it. Now it works. Somehow rebuilding didnt do anything, but this did.

Any such behavior would be compiler-dependent. It’s not a C++ standard to do so, and Xcode for one does not do that.