factoryInstance = new nsLocaleMacFactory(aCID);
factoryInstance = new nsLocaleMacFactory(aClass);
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,                                           const nsCID &aClass,                                           const char *aClassName,                                           const char *aProgID,                                           nsIFactory **aFactory){	nsIFactory*	factoryInstance;	nsresult		res;	if (aFactory == NULL) return NS_ERROR_NULL_POINTER;	//	// first check for the nsILocaleFactory interfaces	//  	if (aCID.Equals(kLocaleFactoryCID))	{		nsLocaleFactory *factory = new nsLocaleFactory();		res = factory->QueryInterface(kILocaleFactoryIID, (void **) aFactory);		if (NS_FAILED(res))		{			*aFactory = NULL;			delete factory;		}			return res;	}		//	// let the nsLocaleFactoryWin logic take over from here	//	factoryInstance = new nsLocaleMacFactory(aCID);	if(NULL == factoryInstance) 	{		return NS_ERROR_OUT_OF_MEMORY;  	}	res = factoryInstance->QueryInterface(kIFactoryIID, (void**)aFactory);	if (NS_FAILED(res))	{		*aFactory = NULL;		delete factoryInstance;	}	return res;}