[PATCH] Make X11 Atoms non-static


#1

When a Linux host loads&unloads a Juce plugin without unloading the shared object, and later tries to open the plugin again it triggers a crash.

It should also be possible to trigger the crash by initialize juce_gui, cleanup, and initialize again. But I didn't test this.

Patch to make Juce X11 Atoms non-static follows:
https://github.com/DISTRHO/juce/commit/99432ead51c58521129254e4bc73d255557ee5f6.patch


#2

OK, thanks, we'll take a look asap!

One question: why did you deliberately change it to "const Atom&" as a parameter types? Atom is just a primitive integer type, right?


#3

Just seemed right to me. I often use references when possible.


#4

You should watch some of Chandler Carruth's talks about compiler optimisation techniques - it'll make you think twice before passing by reference rather than by value!