2 ms·
The only thing is that is not always easy to maintain an unique g_current_context across all your classes, specially if you have cross references between your
by pmelendez 14y ago
The only thing is that is not always easy to maintain an unique g_current_context across all your classes, specially if you have cross references between your headers. In those cases it is handy to have Sing::I().something() instead of local_pointer_to_context->something(), where you have to maintain several instances of the same context.
Again, singleton are known to do not be thread-safe so I am just talking about single thread apps (which still exists)