nsIImageManager *manager; NS_NewImageManager(&manager);
nsCOMPtr<nsIImageManager> manager;  manager = do_GetService(kImageManagerCID, &result); if (NS_FAILED(result)) {  if ((result = NS_NewImageManager(getter_AddRefs(manager))) != NS_OK) { return result; }  nsIImageManager *aManager = manager.get(); NS_ADDREF(aManager);  }
int main(int argc, char **argv){  // Hack to get il_ss set so it doesn't fail in xpcompat.c  nsIImageManager *manager;  NS_NewImageManager(&manager);  gTheApp = new nsNativeViewerApp();  putenv("MOZ_TOOLKIT=motif");  gTheApp->Initialize(argc, argv);  gTheApp->Run();  return 0;}