It depends on what you do in your library base. If it only contains constants that are initialized once in LibInit, then there is no problem to use a common library base for all library opener. If not, it can become a bit tricky.
In most cases, however, it is better practice to put such "state variables" in a state that is allocated through a dedicated library function , and also released by a library function.
Think of intuition windows. The "window structure" is actually a big "state variable" intuition creates, deletes and works on. Since intuition has multiple such state variables (windows, screens,...) it is better to have separate "constructors" and "destructors" for them instead of putting them all into the library base.
|