platform/shared/common/iphone/RhoClassFactory.cpp in rhodes-2.3.0 vs platform/shared/common/iphone/RhoClassFactory.cpp in rhodes-2.3.1.beta.1

- old
+ new

@@ -1,22 +1,19 @@ #include "RhoClassfactory.h" #include "sync/SyncThread.h" #include "sync/ClientRegister.h" -namespace rho{ -namespace common{ - IRhoClassFactory* rho_impl_createClassFactory() - { - return new rho::common::CRhoClassFactory; - } +static rho::common::CRhoClassFactory g_oRhoClassFactory; +rho::common::IRhoClassFactory* rho_get_RhoClassFactory() +{ + return &g_oRhoClassFactory; } -} extern "C" { void rho_clientregister_create(const char* szDevicePin) { - rho::sync::CClientRegister::Create(new rho::common::CRhoClassFactory, szDevicePin); + rho::sync::CClientRegister::Create(szDevicePin); } };