typeid(T).hash_code在Android的部分编译器上同一个类型在不同的so中的hash_code会不同,会导致GlobalSingleton无法工作;
若最终的dll/so集合混用了不同类型、不同版本的编译器,可能会有hash_code不一致的潜在风险。
|
"Obtain", typeid(T).hash_code(), sizeof(T)); |
|
"Release", typeid(T).hash_code()); |
|
"Count", typeid(T).hash_code()) > 0); |
typeid(T).hash_code在Android的部分编译器上同一个类型在不同的so中的hash_code会不同,会导致GlobalSingleton无法工作;
若最终的dll/so集合混用了不同类型、不同版本的编译器,可能会有hash_code不一致的潜在风险。
GlobalSingleton/Common/GlobalSingletonContext.hpp
Line 29 in 9b834b8
GlobalSingleton/Common/GlobalSingletonContext.hpp
Line 43 in 9b834b8
GlobalSingleton/Common/GlobalSingletonContext.hpp
Line 45 in 9b834b8