LUMIX_RENDERER_API IPlugin* createPlugin(Engine& engine) { RendererImpl* r = engine.getAllocator().newObject<RendererImpl>(engine); if (r->create()) { return r; } engine.getAllocator().deleteObject(r); return nullptr; }
LUMIX_RENDERER_API IPlugin* createPlugin(Engine& engine) { RendererImpl* r = LUMIX_NEW(engine.getAllocator(), RendererImpl)(engine); if (r->create()) { return r; } LUMIX_DELETE(engine.getAllocator(), r); return nullptr; }