You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This causes allocation on threads that never use proj
Interesting... I would have expected the object to be initialized only the first time it is actually used, not when a thread is created (at least, that's how it works on Linux). Anyway someone reported to me about issues with thread_local objects with Visual Studio if GDAL was dynamically loaded in a thread, and I've committed 7014c40 whose side effect should be to avoid OSRPJContextHolder to be constructed unless explicitly called. Nevertheless I've just removed the call to init() in the constructor too
gdal/gdal/ogr/ogr_proj_p.cpp
Line 78 in 3993eb2
The OSRPJContextHolder calls init in it's contructor which causes creation/allocation of a proj context for every thread created in a process.
The simple solution solution is just to remove this line as it gets initialized when requested anyhow.
The text was updated successfully, but these errors were encountered: