They say that early binding solves the problem of synchronization. I couldn’t understand “how”. Is this something special to Java or the same applies to C++ too?
so, with this method we actually won’t require a mutex lock?

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think they are referring to creating the Singleton instance before starting/creating any threads, thus alleviating the need for synchronization at creation.
EDIT: adding info about C++ and static variables
In C++, static variables are also initialized before execution like David Harkness mentions for Java. One issue with this in C++ can be in embedded environments where calls to malloc/new cant be performed until after the system is initialized, in which case using a Singleton static initializer could be problematic.